/* Save Notification System Styles */
/* Fixes the missing styles for the save notification that appears at bottom of page */

/* Main Save Notification */
.save-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-notification, 1080);
    max-width: 300px;
    word-wrap: break-word;
}

/* Visible state */
.save-notification.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Icon styling */
.save-notification i {
    font-size: 16px;
    flex-shrink: 0;
}

/* Text styling */
#save-notification-text {
    flex: 1;
    line-height: 1.4;
}

/* Progress Notification (appears near progress bar) */
.progress-notification {
    position: fixed;
    top: 70px;
    right: 20px;
    background: #2196F3;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.3s ease;
    z-index: var(--z-notification, 1080);
}

.progress-notification.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Progress Restoration Toast (appears when progress is restored) */
.progress-restoration-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-notification, 1080);
    min-width: 320px;
}

.progress-restoration-toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.toast-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon i {
    color: white;
    font-size: 24px;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-content strong {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 600;
}

#restoration-details {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* Animation for save indicator pulse */
@keyframes savePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.save-notification.saving i {
    animation: savePulse 0.6s ease-in-out;
}

/* Different notification types */
.save-notification.info {
    background: #2196F3;
}

.save-notification.warning {
    background: #FF9800;
}

.save-notification.error {
    background: #F44336;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .save-notification {
        bottom: 70px; /* Account for mobile navigation */
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }

    .progress-notification {
        top: 60px;
        right: 10px;
        left: auto;
        max-width: 200px;
    }

    .progress-restoration-toast {
        width: calc(100% - 40px);
        min-width: unset;
        max-width: 400px;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 896px) and (orientation: landscape) {
    .save-notification {
        bottom: 10px;
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .progress-notification {
        top: 50px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Dark mode support (if implemented in future) */
@media (prefers-color-scheme: dark) {
    .progress-restoration-toast {
        background: #2a2a2a;
        color: white;
    }

    .toast-content strong {
        color: white;
    }

    #restoration-details {
        color: #ccc;
    }
}

/* Accessibility - High contrast mode */
@media (prefers-contrast: high) {
    .save-notification {
        border: 2px solid white;
    }

    .progress-notification {
        border: 2px solid white;
    }

    .progress-restoration-toast {
        border: 2px solid black;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .save-notification,
    .progress-notification,
    .progress-restoration-toast {
        transition: opacity 0.01ms;
    }

    .save-notification.saving i {
        animation: none;
    }
}

/* Z-index management to ensure notifications appear above all content */
.save-notification {
    z-index: calc(var(--z-notification, 1080) + 10);
}

.progress-notification {
    z-index: calc(var(--z-notification, 1080) + 5);
}

.progress-restoration-toast {
    z-index: calc(var(--z-notification, 1080) + 20);
}

/* Print styles - hide notifications */
@media print {
    .save-notification,
    .progress-notification,
    .progress-restoration-toast {
        display: none !important;
    }
}