/**
 * Beautiful Toast Notification Styles
 * Modern, elegant design with smooth animations
 */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    max-width: 480px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    pointer-events: all;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid;
    font-family: 'Sora', sans-serif;
}

.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-hide {
    transform: translateX(400px);
    opacity: 0;
}

/* Toast Types */
.toast-error {
    border-left-color: #EF4444;
    background: linear-gradient(135deg, #ffffff 0%, #FEF2F2 100%);
}

.toast-success {
    border-left-color: #00A651;
    background: linear-gradient(135deg, #ffffff 0%, #E8F8EF 100%);
}

.toast-warning {
    border-left-color: #F59E0B;
    background: linear-gradient(135deg, #ffffff 0%, #FFFBEB 100%);
}

.toast-info {
    border-left-color: #3B82F6;
    background: linear-gradient(135deg, #ffffff 0%, #EFF6FF 100%);
}

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-error .toast-icon {
    color: #EF4444;
}

.toast-success .toast-icon {
    color: #00A651;
}

.toast-warning .toast-icon {
    color: #F59E0B;
}

.toast-info .toast-icon {
    color: #3B82F6;
}

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

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
    line-height: 1.6;
    word-wrap: break-word;
}

/* Close Button */
.toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #6B7280;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1F2937;
}

.toast-close:active {
    transform: scale(0.95);
}

/* Hover Effect */
.toast:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Progress Bar (Optional Enhancement) */
.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.2;
    border-radius: 0 0 12px 12px;
    animation: toast-progress 5s linear forwards;
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

.toast-error::after {
    color: #EF4444;
}

.toast-success::after {
    color: #00A651;
}

.toast-warning::after {
    color: #F59E0B;
}

.toast-info::after {
    color: #3B82F6;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        align-items: stretch;
    }

    .toast {
        min-width: 0;
        max-width: none;
        transform: translateY(-100px);
    }

    .toast-show {
        transform: translateY(0);
    }

    .toast-hide {
        transform: translateY(-100px);
    }
}

/* Accessibility */
.toast:focus-within {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Multiple Toasts Stacking */
.toast-container .toast:not(:last-child) {
    margin-bottom: 0;
}

/* Icon Animation */
@keyframes toast-icon-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.toast-show .toast-icon {
    animation: toast-icon-bounce 0.5s ease-out;
}

/* Smooth entry for multiple toasts */
.toast:nth-child(1) {
    transition-delay: 0ms;
}

.toast:nth-child(2) {
    transition-delay: 50ms;
}

.toast:nth-child(3) {
    transition-delay: 100ms;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #1F2937;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .toast-error {
        background: linear-gradient(135deg, #1F2937 0%, #3F1F1F 100%);
    }

    .toast-success {
        background: linear-gradient(135deg, #1F2937 0%, #1F3F2F 100%);
    }

    .toast-warning {
        background: linear-gradient(135deg, #1F2937 0%, #3F3F1F 100%);
    }

    .toast-info {
        background: linear-gradient(135deg, #1F2937 0%, #1F2F3F 100%);
    }

    .toast-message {
        color: #F9FAFB;
    }

    .toast-close {
        color: #9CA3AF;
    }

    .toast-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #F9FAFB;
    }
}
