/* ============================================
   MODERN TOAST NOTIFICATIONS - Apple-Style
   ============================================ */

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

.toast {
    pointer-events: auto;
    min-width: 380px;
    max-width: 560px;
    padding: 20px 24px;
    border-radius: 16px;

    /* Glassmorphic Design */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);

    /* Elegant Shadow - Enhanced */
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);

    /* Flexbox Layout */
    display: flex;
    align-items: center;
    gap: 16px;

    /* Smooth Animations */
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;

    /* Typography - Larger & More Readable */
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: #1d1d1f;
}

/* Toast Types - Color-coded borders & Enhanced backgrounds */
.toast.success {
    border-left: 5px solid #30D158;
    background: rgba(240, 255, 244, 1);
    box-shadow:
        0 12px 40px rgba(48, 209, 88, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.06);
}

.toast.error {
    border-left: 5px solid #FF3B30;
    background: rgba(255, 245, 245, 1);
    box-shadow:
        0 12px 40px rgba(255, 59, 48, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.06);
}

.toast.warning {
    border-left: 5px solid #FF9500;
    background: rgba(255, 251, 235, 1);
    color: #8B4000;
    box-shadow:
        0 12px 40px rgba(255, 149, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.06);
}

.toast.info {
    border-left: 5px solid #0071E3;
    background: rgba(240, 248, 255, 1);
    box-shadow:
        0 12px 40px rgba(0, 113, 227, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.06);
}

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

/* Toast Message - More Prominent */
.toast-message {
    flex: 1;
    color: #1d1d1f;
    font-weight: 600;
    font-size: 16px;
}

/* Enhanced Contrast for Warning Messages */
.toast.warning .toast-message {
    color: #8B4000;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
    }

    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
        padding: 14px 16px;
        font-size: 14px;
    }

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .toast {
        background: rgba(44, 44, 46, 0.95);
        color: #f5f5f7;
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.3),
            0 2px 8px rgba(0, 0, 0, 0.2),
            inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    .toast.success {
        background: rgba(30, 45, 35, 0.95);
    }

    .toast.error {
        background: rgba(45, 30, 30, 0.95);
    }

    .toast.warning {
        background: rgba(45, 40, 30, 0.95);
    }

    .toast.info {
        background: rgba(30, 35, 45, 0.95);
    }

    .toast-message {
        color: #f5f5f7;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none;
    }
}
