/**
 * PopRace.org - Toast Notifications CSS
 * V21 Design System Styling
 * Version: 1.0.0
 */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 80px; /* Below header */
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Toast Base */
.toast {
    min-width: 300px;
    max-width: 400px;
    padding: 16px;
    background: var(--dark-navy); /* Navy dark */
    border: 1px solid var(--gold); /* Gold primary */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                0 0 20px var(--gold-alpha-20); /* Gold glow */
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Show Animation */
.toast-show {
    opacity: 1;
    transform: translateX(0);
}

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

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50%;
    background: var(--gold-alpha-10); /* Gold tint */
    color: var(--bright-gold); /* Gold bright */
}

/* Toast Message */
.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: var(--cream); /* Cream */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Toast Close Button */
.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--gold); /* Gold primary */
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    padding: 0;
}

.toast-close:hover {
    background: var(--gold-alpha-20);
    color: var(--bright-gold); /* Gold bright */
}

.toast-close:focus {
    outline: 2px solid var(--bright-gold);
    outline-offset: 2px;
}

/* Toast Type Variants */
.toast-success {
    border-color: #10b981; /* Green */
}

.toast-success .toast-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.toast-error {
    border-color: #ef4444; /* Red */
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.toast-warning {
    border-color: #f59e0b; /* Amber */
}

.toast-warning .toast-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.toast-info {
    border-color: #3b82f6; /* Blue */
}

.toast-info .toast-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* Clickable Toast */
.toast[style*="cursor: pointer"]:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(212, 165, 116, 0.3);
}

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

    .toast {
        min-width: 0;
        max-width: 100%;
        padding: 12px;
    }

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

@media (max-width: 480px) {
    .toast-container {
        top: 50px;
        right: 8px;
        left: 8px;
        gap: 8px;
    }

    .toast {
        padding: 10px;
    }

    .toast-icon {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }

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

    .toast-close {
        width: 20px;
        height: 20px;
        font-size: 18px;
    }
}

/* Animation for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: opacity 0.2s ease;
    }

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

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

    .toast[style*="cursor: pointer"]:hover {
        transform: none;
    }
}
