/* ==========================================
   🔔 ПАНЕЛЬ СПОВІЩЕНЬ - ЧИСТИЙ ДИЗАЙН
   Єдині стилі для всіх сторінок
   ========================================== */

/* ==========================================
   📋 DROPDOWN ПАНЕЛЬ
   ========================================== */
.notification-panel {
    width: 360px;
    max-height: 480px;
    border: none;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2), 
                0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 1050 !important;
    /* НЕ ставимо display - Bootstrap керує через .show */
}

/* Flexbox тільки коли відкрито */
.notification-panel.show {
    display: flex !important;
    flex-direction: column;
}

/* ==========================================
   🎯 ФІКСОВАНА ШАПКА
   ========================================== */
.notification-panel-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    padding: 14px 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-panel-header .fw-bold {
    font-size: 0.95rem;
}

.notification-panel-header .btn-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.notification-panel-header .btn-link:hover {
    color: white !important;
    text-decoration: none;
}

.notification-panel-header .badge {
    font-size: 0.65rem;
    padding: 3px 6px;
}

/* ==========================================
   📜 СКРОЛЮВАНИЙ СПИСОК
   ========================================== */
.notification-panel-body {
    flex: 1;
    overflow-y: auto;
    max-height: 320px;
    background: #fafbfc;
}

/* Кастомний скролбар */
.notification-panel-body::-webkit-scrollbar {
    width: 6px;
}

.notification-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.notification-panel-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.notification-panel-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ==========================================
   🔻 ФІКСОВАНИЙ ФУТЕР
   ========================================== */
.notification-panel-footer {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.notification-panel-footer .btn {
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 10px 16px;
}

/* ==========================================
   😶 ПУСТИЙ СТАН
   ========================================== */
.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.notification-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-empty-icon i {
    font-size: 1.8rem;
    color: #9ca3af;
}

.notification-empty .fw-medium {
    color: #374151;
}

/* ==========================================
   📌 ЕЛЕМЕНТ СПОВІЩЕННЯ
   ========================================== */
.notification-item {
    padding: 14px 16px;
    background: white;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    white-space: normal;
    cursor: pointer;
    text-decoration: none !important;
    display: block;
    color: inherit !important;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #f9fafb;
    text-decoration: none !important;
}

/* Непрочитані */
.notification-item.unread {
    background: linear-gradient(90deg, #fef3c7 0%, #fffbeb 100%);
    border-left: 3px solid #f59e0b;
}

.notification-item.unread:hover {
    background: linear-gradient(90deg, #fde68a 0%, #fef3c7 100%);
}

/* ==========================================
   🎨 ІКОНКИ ТИПІВ
   ========================================== */
.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.notification-icon.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.notification-icon.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.notification-icon.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.notification-icon.promo {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #7c3aed;
}

.notification-icon i {
    font-size: 1.1rem;
}

/* ==========================================
   📝 КОНТЕНТ СПОВІЩЕННЯ
   ========================================== */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #111827;
    margin-bottom: 2px;
    line-height: 1.3;
}

.notification-text {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================
   📱 МОБІЛЬНА АДАПТАЦІЯ
   ========================================== */
@media (max-width: 575px) {
    .notification-panel {
        width: calc(100vw - 20px);
        max-width: 360px;
        right: 10px !important;
        left: auto !important;
        max-height: 70vh;
    }
    
    .notification-panel-body {
        max-height: 50vh;
    }
    
    .notification-panel-header {
        padding: 12px 14px;
    }
    
    .notification-panel-footer {
        padding: 10px 14px;
    }
    
    .notification-item {
        padding: 12px 14px;
    }
}

/* ==========================================
   🖥️ PWA STANDALONE
   ========================================== */
@media all and (display-mode: standalone) {
    .notification-panel {
        max-height: calc(70vh - env(safe-area-inset-bottom, 0px)) !important;
    }
}
