/* ================================================
   MABRIK - Notifications Styles
   ================================================ */

/* ---- Bell Button ---- */
/* Desktop dashboard: inline à côté du titre */
.notif-fixed {
    position: absolute;
    top: 2rem;
    right: calc(2rem + 1%);
    z-index: 10;
}

/* Mobile: fixé en haut à droite */
@media (max-width: 1024px) {
    .notif-fixed {
        position: fixed;
        top: 11px;
        right: 12px;
        z-index: 95;
    }
}

/* Cacher sur la page chat fullscreen */
.dash-main:has(.chat-fullscreen) .notif-fixed {
    display: none;
}

/* Header public: cloche inline dans la nav */
.nav__notif-wrapper {
    display: none;
}

@media (min-width: 769px) {
    .nav__notif-wrapper {
        display: flex;
        align-items: center;
    }
}

.notif-bell {
    position: relative;
}

.notif-bell__btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s;
}

.notif-bell__btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.notif-bell__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    background: var(--orange-500);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid var(--white);
}

/* ---- Dropdown ---- */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 440px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-100);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notif-dropdown--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.notif-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    flex-shrink: 0;
}

.notif-dropdown__header h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.notif-dropdown__mark-all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.15s;
}

.notif-dropdown__mark-all:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* ---- Notification List ---- */
.notif-dropdown__list {
    overflow-y: auto;
    flex: 1;
    max-height: 380px;
}

.notif-dropdown__list::-webkit-scrollbar {
    width: 4px;
}

.notif-dropdown__list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.notif-dropdown__empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.85rem;
}

/* ---- Notification Item ---- */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
    border-bottom: 1px solid var(--gray-50);
    position: relative;
}

.notif-item:hover {
    background: var(--gray-50);
}

.notif-item--unread {
    background: rgba(249, 115, 22, 0.03);
}

.notif-item--unread:hover {
    background: rgba(249, 115, 22, 0.06);
}

.notif-item__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.notif-item__content {
    flex: 1;
    min-width: 0;
}

.notif-item__message {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--gray-700);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item--unread .notif-item__message {
    color: var(--gray-900);
    font-weight: 500;
}

.notif-item__time {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-top: 2px;
    display: block;
}

.notif-item__dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange-500);
    margin-top: 6px;
}

/* ---- Toast (popup temporaire) ---- */
.notif-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 1.1rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-100);
    z-index: 9999;
    max-width: 360px;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-toast--show {
    opacity: 1;
    transform: translateY(0);
}

.notif-toast__icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-toast__content {
    min-width: 0;
}

.notif-toast__content strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.notif-toast__content p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--gray-500);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .notif-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }

    .notif-dropdown--open {
        transform: translateY(0);
    }

    .notif-toast {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
}