/**
 * toast-notifications.css
 * Premium Toast Notification System - Apple-Inspired
 */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
}

/* Individual Toast */
.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(197, 160, 89, 0.1) inset;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    pointer-events: all;
    transform: translateX(450px);
    opacity: 0;
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    position: relative;
    overflow: hidden;
}

/* Slide In Animation */
@keyframes slideIn {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide Out Animation */
.toast.removing {
    animation: slideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes slideOut {
    to {
        transform: translateX(450px);
        opacity: 0;
    }
}

/* Toast Icon */
.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

/* Success Toast */
.toast.success .toast-icon {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Error Toast (for future use) */
.toast.error .toast-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Warning Toast (for future use) */
.toast.warning .toast-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Toast Content */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.toast-message {
    font-size: 13px;
    color: #86868b;
    line-height: 1.4;
}

/* Close Button */
.toast-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: #86868b;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
    transform: scale(1.1);
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold, #c5a059), var(--accent-gold-light, #d4af61));
    border-radius: 0 0 16px 16px;
    animation: progressShrink 3s linear forwards;
}

@keyframes progressShrink {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .toast {
    background: rgba(45, 45, 47, 0.95);
    border-color: rgba(197, 160, 89, 0.3);
}

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

[data-theme="dark"] .toast-message {
    color: #a1a1a6;
}

[data-theme="dark"] .toast-close {
    background: rgba(255, 255, 255, 0.08);
    color: #a1a1a6;
}

[data-theme="dark"] .toast-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #f5f5f7;
}

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

    .toast {
        min-width: auto;
        width: 100%;
        padding: 14px 16px;
        gap: 12px;
    }

    .toast-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .toast-title {
        font-size: 14px;
    }

    .toast-message {
        font-size: 12px;
    }

    @keyframes slideIn {
        from {
            transform: translateY(-120px);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes slideOut {
        to {
            transform: translateY(-120px);
            opacity: 0;
        }
    }
}

/* Accessibility */
.toast:focus {
    outline: 2px solid var(--accent-gold, #c5a059);
    outline-offset: 2px;
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none;
        transform: none;
        opacity: 1;
    }

    .toast.removing {
        animation: none;
        opacity: 0;
    }

    .toast-progress {
        animation: none;
    }
}