/* ================================================================
   NOTIFICATIONS — Cezer Staff Panel
   ================================================================ */

/* ── Bell Button ───────────────────────────────────────────── */
.notif-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text-tertiary);
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
    background: none;
    border: none;
}

.notif-bell-btn:hover {
    background: var(--dark-hover);
    color: var(--text-primary);
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--error);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 0 4px;
    line-height: 1;
}

/* ── Notification Dropdown ─────────────────────────────────── */
.notif-dropdown {
    position: fixed;
    bottom: 80px;
    left: 16px;
    width: 360px;
    max-height: 480px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 200;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.notif-dropdown.show {
    display: flex;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.notif-dropdown-header h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.notif-mark-all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    background: none;
    border: none;
}

.notif-mark-all:hover {
    background: var(--dark-hover);
    color: var(--beige);
}

.notif-dropdown-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.notif-empty {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    padding: 2rem 0;
}

/* ── Notification Item ─────────────────────────────────────── */
.notif-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    transition: background 0.12s ease;
    cursor: pointer;
    position: relative;
}

.notif-item:hover {
    background: var(--dark-hover);
}

.notif-item.unread {
    background: rgba(228, 226, 221, 0.04);
}

.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--beige);
    border-radius: 50%;
}

.notif-item-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(228, 226, 221, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
}

.notif-item-icon i, .notif-item-icon svg {
    width: 16px;
    height: 16px;
}

.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notif-item-message {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-time {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.notif-item-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--text-tertiary);
    opacity: 0;
    transition: opacity 0.12s ease, background 0.12s ease;
    cursor: pointer;
    background: none;
    border: none;
}

.notif-item:hover .notif-item-delete {
    opacity: 1;
}

.notif-item-delete:hover {
    background: rgba(224, 82, 82, 0.15);
    color: var(--error);
}

/* ── Popup Modal ───────────────────────────────────────────── */
.notif-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.notif-popup-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 440px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: popupSlideIn 0.25s ease;
}

@keyframes popupSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-popup-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.notif-popup-header i, .notif-popup-header svg {
    width: 22px;
    height: 22px;
    color: var(--beige);
}

.notif-popup-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.notif-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.notif-popup-item {
    padding: 0.85rem;
    background: rgba(228, 226, 221, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.notif-popup-item:last-child {
    margin-bottom: 0;
}

.notif-popup-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.notif-popup-item-message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.notif-popup-item-from {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-top: 0.4rem;
}

.notif-popup-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

/* ── Send Notification Modal ───────────────────────────────── */
.notif-send-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.notif-send-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 480px;
    max-width: 90vw;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: popupSlideIn 0.25s ease;
}

.notif-send-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.notif-send-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.notif-send-header h3 i, .notif-send-header h3 svg {
    width: 18px;
    height: 18px;
    color: var(--beige);
}

.notif-send-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 1.25rem;
    color: var(--text-tertiary);
    cursor: pointer;
    background: none;
    border: none;
    transition: background 0.12s ease;
}

.notif-send-close:hover {
    background: var(--dark-hover);
}

#notifSendForm {
    padding: 1.25rem 1.5rem;
}

#notifSendForm .form-group:last-of-type {
    margin-bottom: 1rem;
}

#notifSendForm input[type="text"],
#notifSendForm textarea,
#notifSendForm select {
    width: 100%;
}

#notifSendForm .btn-block {
    margin-top: 0.25rem;
}

/* ── Direction send button in topbar ───────────────────────── */
.topbar-send-notif {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: rgba(228, 226, 221, 0.08);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.topbar-send-notif:hover {
    background: var(--dark-hover);
    color: var(--text-primary);
}

.topbar-send-notif i, .topbar-send-notif svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 768px) {
    .notif-dropdown {
        left: 8px;
        right: 8px;
        width: auto;
        bottom: 72px;
    }
}

/* ── Confirm Modal (reusable) ──────────────────────────────── */
.chat-confirm-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 400px;
    max-width: 90vw;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: notifSlideIn 0.2s ease;
}

.chat-confirm-modal h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.chat-confirm-modal p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.chat-confirm-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

@keyframes notifSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── 480px breakpoint ──────────────────────────────────────── */
@media (max-width: 480px) {
    .notif-dropdown {
        left: 4px;
        right: 4px;
        max-height: 55vh;
    }
    .notif-header {
        padding: 0.65rem 0.75rem;
    }
    .notif-header h3 {
        font-size: 0.8rem;
    }
    .notif-item {
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
    }
    .notif-icon {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }
    .notif-icon i, .notif-icon svg {
        width: 13px;
        height: 13px;
    }
    .notif-text {
        font-size: 0.78rem;
    }
    .notif-time {
        font-size: 0.62rem;
    }
    .chat-confirm-modal {
        width: calc(100vw - 2rem);
        padding: 1.25rem;
    }
}
