/**
 * Notifications Modal Styles
 * Anthropic-inspired slide-in modal design
 * Clean, modern, and accessible
 */

/* Overlay */
.notifications-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notifications-modal-overlay.show {
    opacity: 1;
}

.notifications-modal-overlay.show .notifications-modal-panel {
    transform: translateX(0);
}

/* Panel */
.notifications-modal-panel {
    width: 700px;
    max-width: 90vw;
    height: 100vh;
    background: var(--color-surface);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

/* Header */
.notifications-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-subtle);
}

.notifications-modal-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notifications-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notifications-modal-header h2 i {
    color: #1E3A5F;
}

.notification-count-badge {
    background: #1E3A5F;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: var(--color-surface-subtle);
    color: var(--color-text-primary);
}

/* Toolbar */
.notifications-modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    gap: 16px;
    flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group {
    display: flex;
    gap: 4px;
    background: var(--color-surface-subtle);
    padding: 4px;
    border-radius: 8px;
}

.filter-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    color: var(--color-text-primary);
}

.filter-btn.active {
    background: var(--color-surface);
    color: #1E3A5F;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.type-filter {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-text-primary);
    background: var(--color-surface);
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-filter:hover {
    border-color: #1E3A5F;
}

.type-filter:focus {
    outline: none;
    border-color: #1E3A5F;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.action-btn {
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    border-color: #1E3A5F;
    color: #1E3A5F;
    background: #f5f3ff;
}

.action-btn i {
    font-size: 13px;
}

/* Content */
.notifications-modal-content {
    flex: 1;
    overflow-y: auto;
    background: var(--color-surface-subtle);
}

/* Loading/Empty/Error States */
.loading-state,
.empty-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
    color: var(--color-text-secondary);
}

.loading-state i,
.empty-state i,
.error-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #9ca3af;
}

.loading-state i {
    color: #1E3A5F;
}

.error-state i {
    color: #ef4444;
}

.empty-state h3,
.error-state h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.empty-state p,
.error-state p {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-secondary);
}

/* Notifications Table */
.notifications-table {
    padding: 8px;
}

.notification-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    margin-bottom: 8px;
    background: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-row:hover {
    border-color: #1E3A5F;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
    transform: translateY(-1px);
}

.notification-row.unread {
    border-left: 3px solid #1E3A5F;
}

.notification-row.read {
    opacity: 0.7;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.notification-icon.booking {
    background: #dbeafe;
    color: #2563eb;
}

.notification-icon.payment {
    background: #d1fae5;
    color: #059669;
}

.notification-icon.system {
    background: #e0e7ff;
    color: #1E3A5F;
}

.notification-icon.security {
    background: #fef3c7;
    color: #d97706;
}

.notification-icon.team {
    background: #D6E1F0;
    color: #1E3A5F;
}

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

.notification-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.notification-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.notification-time {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}

.notification-message {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.notification-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.meta-item {
    font-size: 12px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-item i {
    font-size: 11px;
    color: #9ca3af;
}

.notification-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notification-row:hover .notification-actions {
    opacity: 1;
}

.unread-dot {
    width: 8px;
    height: 8px;
    background: #1E3A5F;
    border-radius: 50%;
    margin-right: 8px;
}

.action-icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-surface-subtle);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
}

.action-icon-btn:hover {
    background: #e5e7eb;
    color: var(--color-text-primary);
}

.action-icon-btn.delete-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Footer */
.notifications-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.footer-info {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.footer-actions {
    display: flex;
    gap: 8px;
}

.btn-secondary {
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    border-color: #1E3A5F;
    color: #1E3A5F;
}

.btn-secondary i {
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .notifications-modal-panel {
        width: 100vw;
        max-width: 100vw;
    }

    .notifications-modal-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .notification-row {
        flex-direction: column;
        gap: 12px;
    }

    .notification-actions {
        opacity: 1;
    }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    .notifications-modal-panel {
        background: #1f2937;
    }

    .notifications-modal-header {
        background: #111827;
        border-bottom-color: var(--color-text-primary);
    }

    .notifications-modal-header h2 {
        color: #f9fafb;
    }

    .modal-close-btn {
        color: #9ca3af;
    }

    .modal-close-btn:hover {
        background: #374151;
        color: #f9fafb;
    }

    .notifications-modal-toolbar {
        border-bottom-color: var(--color-text-primary);
    }

    .filter-group {
        background: #374151;
    }

    .filter-btn {
        color: #9ca3af;
    }

    .filter-btn:hover {
        color: #f9fafb;
    }

    .filter-btn.active {
        background: #1f2937;
        color: #1E3A5F;
    }

    .type-filter,
    .action-btn,
    .btn-secondary {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .notifications-modal-content {
        background: #111827;
    }

    .notification-row {
        background: #1f2937;
        border-color: var(--color-text-primary);
    }

    .notification-title {
        color: #f9fafb;
    }

    .action-icon-btn {
        background: #374151;
        color: #9ca3af;
    }

    .action-icon-btn:hover {
        background: #4b5563;
        color: #f9fafb;
    }

    .notifications-modal-footer {
        background: #1f2937;
        border-top-color: var(--color-text-primary);
    }
}
