/* ============================================================
   lead-tray.css — v0.9.6 Non-blocking Lead-Tray
   ============================================================ */

.lead-tray {
    position: fixed;
    top: 74px;           /* unter Topbar + Market-Events-Bar */
    right: 8px;
    width: 260px;
    background: #c0c0c0;
    border: 2px outset #fff;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
    z-index: 1500;       /* über Desktops, unter Modals */
    font-family: sans-serif;
    user-select: none;
}

.lead-tray.hidden { display: none; }

.lead-tray-head {
    background: var(--title-bar, #000080);
    color: #fff;
    padding: 3px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: bold;
}

.lead-tray-title {
    display: flex;
    align-items: center;
    gap: 4px;
}

#lead-tray-count {
    background: #fff;
    color: #000;
    padding: 0 5px;
    font-size: 10px;
    border-radius: 6px;
    margin-left: 3px;
}

.lead-tray-actions {
    display: flex;
    gap: 2px;
}

.lead-tray-actions button {
    padding: 0 6px;
    font-size: 10px;
    height: 18px;
}

.lead-tray-settings {
    background: #e8e8e0;
    padding: 5px 8px;
    border-bottom: 1px solid #808080;
    font-size: 10px;
}
.lead-tray-settings.hidden { display: none; }

.lead-tray-list {
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 400px;
    overflow-y: auto;
}

.lead-tray-overflow {
    padding: 3px 8px;
    border-top: 1px solid #808080;
    background: #e8e8e8;
    text-align: center;
}

/* ---- Karten ---- */
.lead-tray-card {
    background: #fff;
    border: 1px solid #707070;
    border-left: 3px solid #888;
    padding: 4px 6px;
    font-size: 10px;
    position: relative;
    transition: background 0.15s;
    animation: leadTrayFadeIn 0.3s ease-out;
}

@keyframes leadTrayFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.lead-tray-card.urgency-warn   { background: #fff8e1; }
.lead-tray-card.urgency-urgent { background: #ffe1e1; animation: leadTrayFadeIn 0.3s ease-out, leadTrayPulse 1.5s ease-in-out infinite; }

@keyframes leadTrayPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200,40,40,0.5); }
    50%      { box-shadow: 0 0 0 3px rgba(200,40,40,0); }
}

.lead-tray-card-head {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.lead-tray-card-tier {
    font-size: 12px;
}

.lead-tray-card-client {
    flex: 1;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    color: #222;
}

.lead-tray-card-expiry {
    font-size: 9px;
    padding: 0 4px;
    border: 1px solid currentColor;
    border-radius: 2px;
    font-weight: bold;
}

.lead-tray-card-expiry.ok     { color: #0a6b0a; }
.lead-tray-card-expiry.warn   { color: #b37a00; }
.lead-tray-card-expiry.urgent { color: #a00; }

.lead-tray-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: #555;
    margin-bottom: 3px;
    gap: 4px;
}

.lead-tray-card-type {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.lead-tray-card-meta {
    font-size: 9px;
    color: #666;
    white-space: nowrap;
}

.lead-tray-card-actions {
    display: flex;
    gap: 3px;
    margin-top: 2px;
}

.lead-tray-card-actions button {
    height: 20px;
    padding: 0 6px;
}

/* ============================================================
   ERA THEMES — Lead-Tray
   v0.9.11.43 (2026-04-29)
   Era 1 (Win95) = default above. E2/E3/E4 below.
   ============================================================ */

/* ============== ERA 2: XP / Luna ============== */
body.era-e2 .lead-tray {
    background: #ece9d8;
    border: 1px solid #0a246a;
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 12px rgba(0,0,0,.3);
    font-family: Tahoma, "Segoe UI", sans-serif;
}
body.era-e2 .lead-tray-head {
    background: linear-gradient(180deg, #2a4a8a 0%, #0a2a6a 100%);
    border-radius: 5px 5px 0 0;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
    padding: 4px 8px;
}
body.era-e2 .lead-tray-actions button {
    background: linear-gradient(180deg, #f4f3ee, #d4d0c0);
    border: 1px solid #6a6a6a;
    border-radius: 3px;
    color: #1a1a1a;
}
body.era-e2 .lead-tray-actions button:hover { background: linear-gradient(180deg, #ffffff, #e0dccb); }
body.era-e2 .lead-tray-actions button:active { background: linear-gradient(180deg, #c8c4b4, #d4d0c0); }
body.era-e2 #lead-tray-count {
    background: #fff;
    color: #0a2a6a;
    border-radius: 8px;
    font-weight: bold;
    border: 1px solid rgba(255,255,255,0.7);
}
body.era-e2 .lead-tray-settings {
    background: #f4f3ee;
    border-bottom: 1px solid #b0a890;
}
body.era-e2 .lead-tray-overflow {
    background: #f4f3ee;
    border-top: 1px solid #b0a890;
    color: #0a2a6a;
}
body.era-e2 .lead-tray-card {
    background: #fff;
    border: 1px solid #b0a890;
    border-left: 3px solid #6aaaee;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
body.era-e2 .lead-tray-card.urgency-warn   { background: #fffbe7; border-left-color: #ffaa00; }
body.era-e2 .lead-tray-card.urgency-urgent { background: #ffe1e1; border-left-color: #d23030; }
body.era-e2 .lead-tray-card-client { color: #0a2a6a; }
body.era-e2 .lead-tray-card-actions button {
    background: linear-gradient(180deg, #f4f3ee, #d4d0c0);
    border: 1px solid #6a6a6a;
    border-radius: 3px;
    color: #1a1a1a;
    font-family: Tahoma, sans-serif;
}
body.era-e2 .lead-tray-card-actions button:hover { background: linear-gradient(180deg, #ffffff, #e0dccb); }
body.era-e2 .lead-tray-card-actions button:active { background: linear-gradient(180deg, #c8c4b4, #d4d0c0); }


/* ============== ERA 3: Material / Flat ============== */
body.era-e3 .lead-tray {
    background: #fafafa;
    border: none;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body.era-e3 .lead-tray-head {
    background: #2196f3;
    border-radius: 4px 4px 0 0;
    color: #fff;
    text-shadow: none;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
}
body.era-e3 .lead-tray-actions button {
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #fff;
    transition: background 0.15s;
}
body.era-e3 .lead-tray-actions button:hover { background: rgba(255,255,255,0.18); }
body.era-e3 #lead-tray-count {
    background: #fff;
    color: #1565c0;
    border-radius: 10px;
    padding: 1px 7px;
    font-weight: 600;
}
body.era-e3 .lead-tray-settings {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 12px;
}
body.era-e3 .lead-tray-overflow {
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    color: #1565c0;
    font-weight: 500;
}
body.era-e3 .lead-tray-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 3px solid #2196f3;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.15s, transform 0.15s;
    padding: 8px 10px;
}
body.era-e3 .lead-tray-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
body.era-e3 .lead-tray-card.urgency-warn   { background: #fff8e1; border-left-color: #ffa726; }
body.era-e3 .lead-tray-card.urgency-urgent { background: #ffebee; border-left-color: #ef5350; }
body.era-e3 .lead-tray-card-client { color: #212121; font-weight: 500; }
body.era-e3 .lead-tray-card-body { color: #757575; }
body.era-e3 .lead-tray-card-meta { color: #9e9e9e; }
body.era-e3 .lead-tray-card-expiry {
    border-radius: 10px;
    border-width: 1px;
    padding: 1px 6px;
    font-weight: 500;
}
body.era-e3 .lead-tray-card-actions button {
    background: transparent;
    border: 1px solid #2196f3;
    border-radius: 4px;
    color: #1565c0;
    font-family: Roboto, sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.3px;
    transition: background 0.15s;
}
body.era-e3 .lead-tray-card-actions button:hover {
    background: rgba(33,150,243,0.08);
}


/* ============== ERA 4: Glass-Dark ============== */
body.era-e4 .lead-tray {
    background: rgba(30,41,59,0.85);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid rgba(102,126,234,0.25);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.55), 0 0 24px rgba(102,126,234,0.18);
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    color: #e2e8f0;
}
body.era-e4 .lead-tray-head {
    background: linear-gradient(135deg, rgba(102,126,234,0.4) 0%, rgba(167,139,250,0.3) 100%);
    border-radius: 13px 13px 0 0;
    border-bottom: 1px solid rgba(102,126,234,0.2);
    color: #f1f5f9;
    text-shadow: none;
    padding: 8px 12px;
}
body.era-e4 .lead-tray-actions button {
    background: rgba(102,126,234,0.15);
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 6px;
    color: #e2e8f0;
    transition: all 0.15s;
}
body.era-e4 .lead-tray-actions button:hover {
    background: rgba(167,139,250,0.3);
    border-color: rgba(167,139,250,0.5);
    color: #fff;
}
body.era-e4 #lead-tray-count {
    background: rgba(34,211,238,0.2);
    color: #67e8f9;
    border: 1px solid rgba(34,211,238,0.4);
    border-radius: 10px;
    padding: 1px 7px;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(34,211,238,0.2);
}
body.era-e4 .lead-tray-settings {
    background: rgba(15,23,42,0.6);
    border-bottom: 1px solid rgba(102,126,234,0.2);
    color: #cbd5e1;
    padding: 8px 12px;
}
body.era-e4 .lead-tray-overflow {
    background: rgba(15,23,42,0.5);
    border-top: 1px solid rgba(102,126,234,0.2);
    color: #22d3ee;
    font-weight: 500;
}
body.era-e4 .lead-tray-card {
    background: rgba(15,23,42,0.65);
    border: 1px solid rgba(102,126,234,0.2);
    border-left: 3px solid #22d3ee;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    color: #cbd5e1;
    transition: all 0.15s;
}
body.era-e4 .lead-tray-card:hover {
    border-color: rgba(167,139,250,0.4);
    box-shadow: 0 4px 16px rgba(102,126,234,0.25);
    transform: translateY(-1px);
}
body.era-e4 .lead-tray-card.urgency-warn {
    background: rgba(67, 51, 14, 0.65);
    border-left-color: #fbbf24;
}
body.era-e4 .lead-tray-card.urgency-urgent {
    background: rgba(67, 14, 14, 0.7);
    border-left-color: #f87171;
    animation: leadTrayFadeIn 0.3s ease-out, leadTrayPulseE4 1.5s ease-in-out infinite;
}
@keyframes leadTrayPulseE4 {
    0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 0 rgba(248,113,113,0.5); }
    50%      { box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 4px rgba(248,113,113,0); }
}
body.era-e4 .lead-tray-card-client {
    color: #f1f5f9;
    font-weight: 600;
}
body.era-e4 .lead-tray-card-body { color: #94a3b8; }
body.era-e4 .lead-tray-card-meta { color: #64748b; }
body.era-e4 .lead-tray-card-expiry {
    border-radius: 8px;
    padding: 1px 6px;
    font-weight: 600;
}
body.era-e4 .lead-tray-card-expiry.ok     { color: #4ade80; }
body.era-e4 .lead-tray-card-expiry.warn   { color: #fbbf24; }
body.era-e4 .lead-tray-card-expiry.urgent { color: #f87171; }
body.era-e4 .lead-tray-card-actions button {
    background: rgba(102,126,234,0.15);
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 6px;
    color: #a78bfa;
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 500;
    transition: all 0.15s;
}
body.era-e4 .lead-tray-card-actions button:hover {
    background: rgba(167,139,250,0.25);
    border-color: rgba(167,139,250,0.5);
    color: #c4b5fd;
}
