/* ============================================================================
   notification-bell.css
   ----------------------------------------------------------------------------
   Bell trigger (desktop + mobile) + shared dropdown panel + mobile bottom-
   drawer variant. Matches platform brand: charcoal #1A1A1F, sunset orange
   #F58220/#F89622, sky blue #56C4F8/#3FA9D9.
   ============================================================================ */

:root {
    --ikh-bell-orange: #F58220;
    --ikh-bell-orange-2: #F89622;
    --ikh-bell-blue: #56C4F8;
    --ikh-bell-charcoal: #1A1A1F;
    --ikh-bell-charcoal-2: #0E0E11;
    --ikh-bell-text: #1A1D20;
    --ikh-bell-muted: #6b7280;
    --ikh-bell-card-bg: #ffffff;
}

/* ── Bell trigger button ────────────────────────────────────── */
.ikh-bell {
    appearance: none;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    border: 1.5px solid rgba(14, 14, 17, 0.08);
    border-radius: 14px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ikh-bell-charcoal);
    cursor: pointer;
    position: relative;
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(14, 14, 17, 0.06);
    flex-shrink: 0;
}
.ikh-bell:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 130, 32, 0.4);
    box-shadow: 0 6px 18px rgba(245, 130, 32, 0.14);
    color: var(--ikh-bell-orange);
}
.ikh-bell:active { transform: translateY(0) scale(0.97); }
.ikh-bell[aria-expanded="true"] {
    background: linear-gradient(135deg, var(--ikh-bell-orange), var(--ikh-bell-orange-2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 22px rgba(245, 130, 32, 0.32);
}
.ikh-bell i { font-size: 1.05rem; line-height: 1; }

/* ── Unread badge ──────────────────────────────────────────── */
.ikh-bell-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
    animation: ikhBellPulse 2.4s ease-in-out infinite;
    letter-spacing: 0.02em;
}
@keyframes ikhBellPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.1); }
}

/* Mobile variant — slightly smaller for compact nav */
.ikh-bell--mobile {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}
.ikh-bell--mobile .ikh-bell-badge {
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 0.6rem;
}

/* ── Dropdown panel (desktop) ─────────────────────────────── */
.ikh-bell-panel {
    position: absolute;
    width: 380px;
    max-width: calc(100vw - 32px);
    background: var(--ikh-bell-card-bg);
    border-radius: 18px;
    box-shadow: 0 24px 56px rgba(14, 14, 17, 0.18), 0 4px 14px rgba(14, 14, 17, 0.08);
    border: 1px solid rgba(14, 14, 17, 0.06);
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.ikh-bell-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.ikh-bell-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(14, 14, 17, 0.06);
    background: linear-gradient(180deg, #fafbfc, #ffffff);
    font-weight: 800;
    color: var(--ikh-bell-charcoal);
    font-size: 0.92rem;
}
.ikh-bell-panel-header i { color: var(--ikh-bell-orange); margin-right: 6px; }

.ikh-bell-mark-all {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--ikh-bell-blue);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}
.ikh-bell-mark-all:hover { background: rgba(86, 196, 248, 0.1); }

.ikh-bell-panel-body {
    max-height: 460px;
    overflow-y: auto;
}
.ikh-bell-panel-body::-webkit-scrollbar { width: 6px; }
.ikh-bell-panel-body::-webkit-scrollbar-thumb {
    background: rgba(14, 14, 17, 0.18);
    border-radius: 3px;
}

.ikh-bell-loading {
    padding: 28px;
    text-align: center;
    color: var(--ikh-bell-muted);
    font-size: 0.85rem;
}

/* ── Bell item ─────────────────────────────────────────────── */
.ikh-bell-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    text-decoration: none;
    color: var(--ikh-bell-text);
    border-bottom: 1px solid rgba(14, 14, 17, 0.04);
    transition: background 0.18s ease;
    position: relative;
}
.ikh-bell-item:last-child { border-bottom: 0; }
.ikh-bell-item:hover { background: rgba(245, 130, 32, 0.05); }
.ikh-bell-item.is-unread {
    background: linear-gradient(90deg, rgba(245, 130, 32, 0.06), transparent 60%);
}

.ikh-bell-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f1f5;
}
.ikh-bell-thumb--icon {
    background: linear-gradient(135deg, var(--ikh-bell-orange), var(--ikh-bell-orange-2));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: 0 4px 12px rgba(245, 130, 32, 0.28);
}

.ikh-bell-item-body { flex: 1 1 auto; min-width: 0; }
.ikh-bell-item-title {
    font-weight: 800;
    font-size: 0.86rem;
    color: var(--ikh-bell-charcoal);
    margin-bottom: 2px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.ikh-bell-item-msg {
    font-size: 0.78rem;
    color: var(--ikh-bell-muted);
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ikh-bell-item-time {
    font-size: 0.7rem;
    color: var(--ikh-bell-muted);
    margin-top: 4px;
    font-weight: 600;
}

.ikh-bell-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ikh-bell-orange);
    flex-shrink: 0;
    margin-top: 6px;
    box-shadow: 0 0 0 4px rgba(245, 130, 32, 0.18);
}

.ikh-bell-empty {
    text-align: center;
    padding: 36px 24px;
}
.ikh-bell-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(245, 130, 32, 0.08);
    color: var(--ikh-bell-orange);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 10px;
}
.ikh-bell-empty-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--ikh-bell-charcoal);
    margin-bottom: 4px;
}
.ikh-bell-empty-sub {
    font-size: 0.78rem;
    color: var(--ikh-bell-muted);
    line-height: 1.5;
}

.ikh-bell-panel-footer {
    border-top: 1px solid rgba(14, 14, 17, 0.06);
    padding: 12px 18px;
    background: #fafbfc;
}
.ikh-bell-see-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ikh-bell-orange);
    font-weight: 800;
    font-size: 0.84rem;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.ikh-bell-see-all:hover { color: var(--ikh-bell-orange-2); }

/* ── Mobile drawer variant ────────────────────────────────── */
@media (max-width: 720px) {
    .ikh-bell-panel--drawer {
        position: fixed !important;
        top: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: 80vh;
        border-radius: 22px 22px 0 0;
        transform: translateY(100%) !important;
    }
    .ikh-bell-panel--drawer.open { transform: translateY(0) !important; }
    .ikh-bell-panel--drawer::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        margin: 8px auto 0;
        background: rgba(14, 14, 17, 0.18);
        border-radius: 2px;
    }
    .ikh-bell-panel--drawer .ikh-bell-panel-body { max-height: calc(80vh - 130px); }
}
