/* =========================================================================
   Helix ERP — In-App Notifications
   BEM: .helix-notif__*
   Uses Helix brand palette tokens from helix-erp-palette.css
   ========================================================================= */

/* ── Navbar overflow fix (allow dropdown to escape container) ────────── */

.navbar-nav .helix-notif__bell-wrapper {
    position: relative;
}

.navbar-nav,
.navbar .container-fluid,
.navbar,
header {
    overflow: visible !important;
}

/* ── Bell icon ──────────────────────────────────────────────────────────── */

.helix-notif__bell-wrapper {
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
}

.helix-notif__bell-wrapper .la-bell {
    transition: color 0.15s;
}

.helix-notif__bell-wrapper:hover .la-bell {
    color: #fff !important;
}

/* ── Badge ──────────────────────────────────────────────────────────────── */

.helix-notif__badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    color: #fff;
    background: var(--helix-rosa, #FF4395);
    border-radius: 9px;
    animation: helix-badge-pop 0.3s ease;
}

@keyframes helix-badge-pop {
    0%   { transform: scale(0); }
    60%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ── Panel dropdown ─────────────────────────────────────────────────────── */

.helix-notif__panel {
    display: none;
    position: fixed;
    width: 380px;
    max-height: 480px;
    background: #1e2a3a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 9999;
    animation: helix-notif-drop-in 0.15s ease-out;
}

.helix-notif__panel--open {
    display: block;
}

@keyframes helix-notif-drop-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Panel header ───────────────────────────────────────────────────────── */

.helix-notif__panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.helix-notif__panel-title {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

.helix-notif__mark-all {
    background: none;
    border: none;
    color: var(--helix-morado, #8159FF);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
    font-family: inherit;
}

.helix-notif__mark-all:hover {
    background: rgba(129, 89, 255, 0.1);
}

/* ── Notification list ──────────────────────────────────────────────────── */

.helix-notif__list {
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
}

.helix-notif__list::-webkit-scrollbar {
    width: 4px;
}

.helix-notif__list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* ── Notification item ──────────────────────────────────────────────────── */

.helix-notif__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.12s;
    cursor: default;
}

.helix-notif__item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.helix-notif__item--read {
    opacity: 0.5;
}

/* ── Item icon ──────────────────────────────────────────────────────────── */

.helix-notif__item-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.helix-notif__item-icon--maintenance {
    background: rgba(255, 81, 24, 0.15);
    color: var(--helix-naranja, #FF5118);
}

.helix-notif__item-icon--announcement {
    background: rgba(129, 89, 255, 0.15);
    color: var(--helix-morado, #8159FF);
}

.helix-notif__item-icon--system_update {
    background: rgba(0, 229, 188, 0.15);
    color: var(--helix-aqua, #00E5BC);
}

.helix-notif__item-icon--info {
    background: rgba(129, 89, 255, 0.15);
    color: var(--helix-morado, #8159FF);
}

/* ── Item body ──────────────────────────────────────────────────────────── */

.helix-notif__item-body {
    flex: 1;
    min-width: 0;
}

.helix-notif__item-title {
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
    line-height: 1.3;
    margin: 0;
}

.helix-notif__item-text {
    font-size: 12px;
    color: #8fa3bf;
    margin-top: 2px;
    line-height: 1.3;
    margin-bottom: 0;
}

.helix-notif__item-time {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    display: block;
}

/* ── Unread dot ─────────────────────────────────────────────────────────── */

.helix-notif__unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--helix-morado, #8159FF);
    flex-shrink: 0;
    margin-top: 6px;
    cursor: pointer;
}

/* ── Empty state ────────────────────────────────────────────────────────── */

.helix-notif__empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
}

.helix-notif__empty i {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
    opacity: 0.5;
}

.helix-notif__empty p {
    font-size: 13px;
    margin: 0;
}

/* ── Banner notification type modifiers (extend helix-banner) ───────────── */

.helix-banner--maintenance {
    background: var(--tblr-warning-bg-subtle, #fff0e6);
    border-bottom: 1px solid var(--tblr-warning-border-subtle, #ffb088);
    color: var(--tblr-warning-text-emphasis, #c2410c);
}

.helix-banner--maintenance .helix-banner__icon {
    background: rgba(255, 81, 24, 0.15);
    color: var(--helix-naranja, #FF5118);
}

.helix-banner--maintenance .helix-banner__cta {
    background: var(--helix-naranja, #FF5118);
    color: #fff;
}

.helix-banner--maintenance .helix-banner__dismiss {
    color: var(--tblr-warning-border-subtle, #ffb088);
}

.helix-banner--maintenance .helix-banner__dismiss:hover {
    color: var(--helix-naranja, #FF5118);
    background: rgba(255, 81, 24, 0.1);
}

.helix-banner--announcement {
    background: var(--tblr-primary-bg-subtle, #ede7ff);
    border-bottom: 1px solid var(--tblr-primary-border-subtle, #c4b1ff);
    color: var(--tblr-primary-text-emphasis, #5a2edd);
}

.helix-banner--announcement .helix-banner__icon {
    background: rgba(129, 89, 255, 0.15);
    color: var(--helix-morado, #8159FF);
}

.helix-banner--announcement .helix-banner__cta {
    background: var(--helix-morado, #8159FF);
    color: #fff;
}

.helix-banner--announcement .helix-banner__dismiss {
    color: var(--tblr-primary-border-subtle, #c4b1ff);
}

.helix-banner--announcement .helix-banner__dismiss:hover {
    color: var(--helix-morado, #8159FF);
    background: rgba(129, 89, 255, 0.1);
}

.helix-banner--system_update {
    background: #d1faf0;
    border-bottom: 1px solid #6ee7c7;
    color: #059669;
}

.helix-banner--system_update .helix-banner__icon {
    background: rgba(0, 229, 188, 0.15);
    color: var(--helix-aqua, #00E5BC);
}

.helix-banner--system_update .helix-banner__cta {
    background: var(--helix-aqua, #00E5BC);
    color: #064e3b;
}

.helix-banner--system_update .helix-banner__dismiss {
    color: #6ee7c7;
}

.helix-banner--system_update .helix-banner__dismiss:hover {
    color: #059669;
    background: rgba(0, 229, 188, 0.1);
}

/* ── Countdown ──────────────────────────────────────────────────────────── */

.helix-banner__countdown {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
