/* ============================================================
   HEADER DROPDOWNS — notifications + settings
   ============================================================ */

/* ── Shared dropdown wrapper ─────────────────────────────── */
.hdr-dropdown-wrap {
    position: relative;
}

/* ── Bell button — extra style on top of .custom-button ──── */
.hdr-bell {
    position: relative; /* needed for badge positioning */
}

.hdr-bell.has-notif {
    background: linear-gradient(rgba(253, 215, 126, 0.12), rgba(253, 215, 126, 0.04));
}

/* ── Badge count ─────────────────────────────────────────── */
.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #f84b78;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 900;
    line-height: 1;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: notifPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes notifPop {
    0%   { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Shared dropdown panel ───────────────────────────────── */
.hdr-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 300px;
    max-width: calc(100vw - 32px);
    background: #141414;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    box-shadow: 0 20px 48px rgba(0,0,0,0.7);
    z-index: 500;
    overflow: hidden;
    display: none;
}

.hdr-dropdown.hdr-dropdown--right {
    left: auto;
    right: 0;
    min-width: 220px;
}

.hdr-dropdown.open {
    display: block;
    animation: hdrSlideIn 0.18s ease both;
}

@keyframes hdrSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Dropdown header ─────────────────────────────────────── */
.hdr-dropdown__header {
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #555;
}

/* ── Empty state ─────────────────────────────────────────── */
.notif-empty {
    padding: 24px 16px;
    text-align: center;
    font-size: 0.82rem;
    color: #444;
    margin: 0;
}

/* ── Notification item ───────────────────────────────────── */
.notif-item {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notif-item:last-child { border-bottom: none; }

.notif-item--host       { border-left: 3px solid #fdd77e; }
.notif-item--subscriber { border-left: 3px solid #49bac1; }
.notif-item--live       { border-left: 3px solid #6fcf97; }

.notif-item__type {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.notif-item--host       .notif-item__type { color: #fdd77e; }
.notif-item--subscriber .notif-item__type { color: #49bac1; }
.notif-item--live       .notif-item__type { color: #6fcf97; }

.notif-item__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notif-item__body {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.5;
}

.notif-item__body strong { color: #ccc; }

.notif-item__countdown {
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #fdd77e;
    white-space: nowrap;
}

.notif-item__countdown.live { color: #6fcf97; }

/* ── Notification action buttons ────────────────────────── */
.notif-item__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.notif-btn {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
    text-decoration: none;
    display: inline-block;
}

.notif-btn:hover { opacity: 0.85; }

.notif-btn--join {
    background: linear-gradient(135deg, #6fcf97, #27ae60);
    color: #111;
}

.notif-btn--remind {
    background: rgba(253, 215, 126, 0.12);
    border: 1px solid rgba(253, 215, 126, 0.3);
    color: #fdd77e;
}

.notif-btn--remind:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ── Settings rows ───────────────────────────────────────── */
.hdr-settings-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #ccc;
    font-family: inherit;
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: left;
    transition: background 0.15s, color 0.15s;
    box-sizing: border-box;
}

.hdr-settings-row:last-child { border-bottom: none; }

.hdr-settings-row:hover {
    background: rgba(255,255,255,0.04);
    color: #fff;
}

.hdr-settings-row--danger:hover {
    background: rgba(248, 75, 120, 0.08);
    color: #f84b78;
}

.hdr-settings-row--danger:hover svg { fill: #f84b78; }

.hdr-settings-row__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: #666;
}

.hdr-settings-row__icon svg { fill: currentColor; }

.hdr-settings-row:hover .hdr-settings-row__icon { color: inherit; }

.hdr-settings-row__label { flex: 1; }

/* Active state for sound toggle */
#notificationButton .hdr-settings-row__icon svg { fill: #6fcf97; }
#notificationButton.sound-off .hdr-settings-row__icon svg { fill: #555; }
#notificationButton.sound-off .hdr-settings-row__label { color: #666; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .hdr-dropdown {
        width: calc(100vw - 32px);
        left: auto;
        right: -10px;
    }
    .hdr-dropdown.hdr-dropdown--right {
        right: -10px;
    }
}
