/* ==========================================================================
   KUMARA NOTIFICACIONES IN-APP — ESTILOS CENTRALIZADOS (B2B TIENDAS & B2C CLIENTES)
   ========================================================================== */

.km-notif-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.km-notif-bell-btn {
    position: relative;
    padding: 4px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--store-primary-text, #111827);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.km-notif-bell-btn:hover {
    opacity: 0.78;
}

.gestion-content .km-notif-bell-btn {
    padding: 6px 8px;
    color: #0f172a;
}

.gestion-content .km-notif-bell-btn:hover {
    opacity: 1;
    background-color: #f1f5f9;
}

.km-notif-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px #ffffff;
}

.km-notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(370px, 92vw);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
    z-index: 1080;
    display: none;
    overflow: hidden;
    text-align: left;
    white-space: normal;
}

.km-notif-dropdown.open {
    display: block;
}

.km-notif-dd-head {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: #f8fafc;
}

.km-notif-dd-list {
    max-height: 360px;
    overflow-y: auto;
}

.km-notif-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s ease;
}

.km-notif-item:hover {
    background: #f8fafc;
}

.km-notif-item.unread {
    background: #eff6ff;
}

.km-notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
    margin-top: 6px;
    flex-shrink: 0;
}

.km-notif-item:not(.unread) .km-notif-dot {
    background: transparent;
}

.km-notif-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.km-notif-lvl-INFO { background: #e0f2fe; color: #0369a1; }
.km-notif-lvl-SUCCESS { background: #dcfce7; color: #15803d; }
.km-notif-lvl-WARNING { background: #fef3c7; color: #b45309; }
.km-notif-lvl-DANGER { background: #fee2e2; color: #b91c1c; }

.km-notif-dd-foot {
    padding: 0.7rem 1rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    background: #f8fafc;
}

/* Centro completo de notificaciones */
.km-notif-center-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}

.km-notif-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.km-notif-pill {
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

.km-notif-pill.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

/* Optimización Mobile-First para navbar y panel vendedor */
@media (max-width: 767.98px) {
    .km-global-header .km-notif-wrapper,
    .gestion-content .content-header .km-notif-wrapper {
        position: static;
    }

    .gestion-content .content-header {
        position: relative;
    }

    .km-notif-dropdown {
        left: 10px;
        right: 10px;
        top: calc(100% + 6px);
        width: auto;
        max-width: none;
        border-radius: 14px;
    }

    .km-notif-dd-list {
        max-height: min(62vh, 380px);
    }
}

@media (max-width: 576px) {
    .km-global-header .km-notif-bell-btn {
        padding: 2px;
    }

    .km-global-header .km-notif-bell-btn i {
        font-size: 1.28rem;
    }

    .km-notif-badge {
        top: -4px;
        right: -5px;
        min-width: 15px;
        height: 15px;
        font-size: 0.58rem;
        line-height: 15px;
    }
}
