/**
 * Global Toast Notification Styles
 * 
 * Beautiful, modern toast notifications for StudyPilot
 */

/* Toast Container */
.toast-container {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Position variations */
.toast-top-right {
    top: 24px;
    right: 24px;
}

.toast-top-left {
    top: 24px;
    left: 24px;
}

.toast-bottom-right {
    bottom: 24px;
    right: 24px;
}

.toast-bottom-left {
    bottom: 24px;
    left: 24px;
}

.toast-top-center {
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
}

.toast-bottom-center {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
}

/* Toast Base */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 500px;
    padding: 16px 20px;
    background: rgba(14, 46, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(68, 229, 231, 0.1);
    pointer-events: auto;
    cursor: default;
    font-family: 'Poppins', sans-serif;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s 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) scale(0.8);
    transition: all 0.3s ease-out;
}

/* Left position animations */
.toast-top-left .toast,
.toast-bottom-left .toast {
    transform: translateX(-400px);
}

.toast-top-left .toast-show,
.toast-bottom-left .toast-show {
    transform: translateX(0);
}

.toast-top-left .toast-hide,
.toast-bottom-left .toast-hide {
    transform: translateX(-400px) scale(0.8);
}

/* Center position animations */
.toast-top-center .toast,
.toast-bottom-center .toast {
    transform: translateY(-100px);
}

.toast-top-center .toast-show,
.toast-bottom-center .toast-show {
    transform: translateY(0);
}

.toast-top-center .toast-hide,
.toast-bottom-center .toast-hide {
    transform: translateY(-100px) scale(0.8);
}

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.toast-message {
    font-size: 14px;
    line-height: 1.5;
    color: #FFFFFF;
    word-wrap: break-word;
}

/* Close Button */
.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    opacity: 0.6;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Toast Type Variations */

/* Success */
.toast-success {
    border-left: 3px solid #44E5E7;
}

.toast-success .toast-icon {
    color: #44E5E7;
}

.toast-success .toast-close {
    color: #44E5E7;
}

/* Error */
.toast-error {
    border-left: 3px solid #FF6B6B;
}

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

.toast-error .toast-close {
    color: #FF6B6B;
}

/* Warning */
.toast-warning {
    border-left: 3px solid #FFB84D;
}

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

.toast-warning .toast-close {
    color: #FFB84D;
}

/* Info */
.toast-info {
    border-left: 3px solid #4B899D;
}

.toast-info .toast-icon {
    color: #4B899D;
}

.toast-info .toast-close {
    color: #4B899D;
}

/* Progress Bar (optional) */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: toastProgress 4s linear;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Hover effect */
.toast:hover {
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(68, 229, 231, 0.2);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 640px) {
    .toast-container {
        left: 16px !important;
        right: 16px !important;
        top: 16px !important;
        transform: none !important;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: light) {
    .toast {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.15),
            0 0 0 1px rgba(0, 0, 0, 0.1);
    }
    
    .toast-message {
        color: #0E2E2E;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .toast,
    .toast-show,
    .toast-hide {
        transition: opacity 0.2s ease;
        transform: none !important;
    }
}

/* Print styles */
@media print {
    .toast-container {
        display: none !important;
    }
}

