/**
 * Unified Notification System Styles
 * Used by both homepage and admin panel
 */

/* Container */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000004;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: auto;
    pointer-events: none;
}

/* Notification Card */
.notification {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    min-width: 300px;
}

/* Accent Border */
.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: currentColor;
}

/* Animation States */
.notification.show {
    transform: translateX(0);
    opacity: 1;
    animation: notificationSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.hide {
    transform: translateX(120%);
    opacity: 0;
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Type Colors */
.notification.success {
    color: #10b981;
}

.notification.error {
    color: #ef4444;
}

.notification.warning {
    color: #f59e0b;
}

.notification.info {
    color: #3b82f6;
}

.notification.loading {
    color: #8b5cf6;
}

/* Icon */
.notification-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    opacity: 0.9;
}

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

.notification-title {
    font-weight: 600;
    font-size: 13px;
    color: #f1f5f9;
    margin: 0 0 2px 0;
    line-height: 1.4;
}

.notification-message {
    font-size: 12px;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Close Button */
.notification-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(71, 85, 105, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #94a3b8;
    transition: all 0.2s ease;
    font-size: 16px;
}

.notification-close:hover {
    background: rgba(100, 116, 139, 0.6);
    color: #e2e8f0;
    transform: scale(1.05);
}

@media (hover: none) and (pointer: coarse) {
    .notification-close {
        min-width: 32px;
        min-height: 32px;
    }
}

/* Progress Bar */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: currentColor;
    opacity: 0.5;
    width: 100%;
    border-radius: 0 0 12px 12px;
}

/* Progress bar animation */
@keyframes progressBarAnimation {
    from { width: 100%; }
    to { width: 0%; }
}

.notification .notification-progress.animating {
    animation: progressBarAnimation linear forwards;
}

/* ========================================
   LIGHT MODE THEME
   ======================================== */
[data-theme="light"] .notification {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 
                0 0 0 1px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .notification-title {
    color: #1e293b;
}

[data-theme="light"] .notification-message {
    color: #475569;
}

[data-theme="light"] .notification-close {
    background: rgba(148, 163, 184, 0.15);
    color: #64748b;
}

[data-theme="light"] .notification-close:hover {
    background: rgba(148, 163, 184, 0.25);
    color: #334155;
}


@media (prefers-contrast: high) {
    .notification {
        border: 2px solid currentColor;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .notification {
        transform: translateY(-100%);
    }

    .notification.show {
        transform: translateY(0);
    }

    .notification.hide {
        transform: translateY(-100%);
    }
}

@media (max-width: 320px) {
    .notification-container,
    #notification-container {
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
        bottom: auto !important;
        max-width: none;
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .notification {
        transition: opacity 0.2s ease;
        transform: none !important;
    }

    .notification.show {
        opacity: 1;
        animation: none;
    }

    .notification.hide {
        opacity: 0;
    }
}

