/**
 * Universal Notification Center CSS
 * Palia-themed notification modal styling for friend requests, events, and system notifications
 * Supports 3-tab interface with action buttons, badges, and visual hierarchy
 */

/* Main dropdown modal container */
.notification-center-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 400px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
    z-index: 10000;
    display: none;
    overflow: hidden;
    opacity: 1;
}

/* Ensure parent container has relative positioning */
.notification-btn-container {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .notification-center-dropdown {
        width: 90vw;
        max-width: 380px;
        right: -10px;
    }
}

/* Dropdown header with gradient */
.notification-dropdown-header {
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notification-dropdown-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Dropdown body with scrolling */
.notification-dropdown-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

/* Old notification styles for compatibility */
.notification-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e2e8f0;
}

.tab-button {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: #6c757d;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.tab-button:hover {
    background: #f1f3f4;
}

.notification-list {
    padding: 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f8ff;
    border-left: 3px solid #667eea;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.notification-message {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.notification-time {
    color: #999;
    font-size: 0.75rem;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    color: #ff4757;
    background: #fee;
}

/* Empty state */
.notification-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #9ca3af;
}

.notification-empty i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

.notification-empty p {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    font-size: 0.95rem;
}

.notification-empty small {
    color: #9ca3af;
    font-size: 0.8rem;
}

/* NEW NOTIFICATION MODAL STYLES */

/* Updated header with title row */
.notification-header-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    width: 100%;
}

.notification-icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.notification-icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Quick stats badges */
.notification-quick-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.stat-badge:hover {
    background: rgba(255, 255, 255, 0.3);
}

.stat-count {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* New tab system */
.notification-tabs-new {
    display: flex;
    background: #f9fafb;
    padding: 8px;
    gap: 4px;
}

.notification-tab-new {
    flex: 1;
    padding: 0.625rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.notification-tab-new.active {
    color: #667eea;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.notification-tab-new:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

.tab-badge-new {
    background: #ef4444;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

/* New notification list */
.notification-list-new {
    max-height: 450px;
    overflow-y: auto;
}

.notification-item-new {
    padding: 1rem 1.25rem;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s;
}

.notification-item-new:hover {
    background: #f9fafb;
}

.notification-item-new.unread {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.notification-item-new.friend-type {
    border-left-color: #3b82f6;
}

.notification-item-new.friend-type.unread {
    background: #eff6ff;
}

.notification-item-new.event-type {
    border-left-color: #10b981;
}

.notification-item-new.event-type.unread {
    background: #f0fdf4;
}

.notification-item-new.system-type {
    border-left-color: #8b5cf6;
}

.notification-item-new.system-type.unread {
    background: #f5f3ff;
}

.notification-header-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.625rem;
}

.notification-icon-new {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.friend-icon-new {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.event-icon-new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.system-icon-new {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.notification-body-new {
    flex: 1;
}

.notification-title-new {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.375rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.notification-text-new {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.notification-meta-new {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #9ca3af;
    font-size: 0.75rem;
}

.notification-meta-new i {
    font-size: 0.7rem;
}

/* Action buttons in notifications */
.notification-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.notification-action-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-action-btn.primary {
    background: #3b82f6;
    color: white;
}

.notification-action-btn.primary:hover {
    background: #2563eb;
}

.notification-action-btn.secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.notification-action-btn.secondary:hover {
    background: #e5e7eb;
}

.notification-action-btn.success {
    background: #10b981;
    color: white;
}

.notification-action-btn.success:hover {
    background: #059669;
}

.notification-action-btn.danger {
    background: #ef4444;
    color: white;
}

.notification-action-btn.danger:hover {
    background: #dc2626;
}

/* Section headers */
.notification-group-header {
    padding: 0.75rem 1.25rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-group-header i {
    font-size: 0.8rem;
}

/* ==================== DARK MODE STYLES ==================== */
[data-theme="dark"] .notification-center-dropdown {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .notification-tabs {
    background: #0f172a;
    border-bottom-color: #334155;
}

[data-theme="dark"] .tab-button {
    color: #94a3b8;
}

[data-theme="dark"] .tab-button.active {
    color: #a78bfa;
    border-bottom-color: #a78bfa;
    background: #1e293b;
}

[data-theme="dark"] .tab-button:hover {
    background: #334155;
}

[data-theme="dark"] .notification-item {
    border-bottom-color: #334155;
}

[data-theme="dark"] .notification-item:hover {
    background: #334155;
}

[data-theme="dark"] .notification-item.unread {
    background: rgba(139, 92, 246, 0.1);
    border-left-color: #a78bfa;
}

[data-theme="dark"] .notification-title {
    color: #f1f5f9;
}

[data-theme="dark"] .notification-message {
    color: #94a3b8;
}

[data-theme="dark"] .notification-time {
    color: #64748b;
}

[data-theme="dark"] .notification-close:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

[data-theme="dark"] .notification-empty {
    color: #64748b;
}

[data-theme="dark"] .notification-empty i {
    color: #475569;
}

[data-theme="dark"] .notification-empty small {
    color: #64748b;
}

/* Dark mode for new notification styles */
[data-theme="dark"] .notification-tabs-new {
    background: #0f172a;
    border-bottom-color: #334155;
}

[data-theme="dark"] .notification-tab-new {
    color: #94a3b8;
}

[data-theme="dark"] .notification-tab-new:hover {
    background: #334155;
}

[data-theme="dark"] .notification-tab-new.active {
    background: #1e293b;
    color: #a78bfa;
    border-bottom-color: #a78bfa;
}

[data-theme="dark"] .notification-list-new {
    background: #1e293b;
}

[data-theme="dark"] .notification-item-new {
    background: #1e293b;
    border-bottom-color: #334155;
}

[data-theme="dark"] .notification-item-new:hover {
    background: #334155;
}

[data-theme="dark"] .notification-item-new.unread {
    background: rgba(139, 92, 246, 0.1);
    border-left-color: #a78bfa;
}

[data-theme="dark"] .notification-avatar-new {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="dark"] .notification-title-new {
    color: #f1f5f9;
}

[data-theme="dark"] .notification-text-new {
    color: #94a3b8;
}

[data-theme="dark"] .notification-meta-new {
    color: #64748b;
}

[data-theme="dark"] .notification-action-btn.secondary {
    background: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .notification-action-btn.secondary:hover {
    background: #475569;
}

[data-theme="dark"] .notification-group-header {
    background: #0f172a;
    border-bottom-color: #334155;
    color: #64748b;
}
