/* ==================== GLASSMORPHISM TOAST NOTIFICATIONS ==================== */

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: 100%;
    pointer-events: none;
}

.toast-notification {
    background: rgba(30, 41, 59, 0.85);
    /* Dark Glass */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transform: translateX(100%);
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    color: #f8fafc;
}

.toast-notification.closing {
    animation: slideOut 0.3s ease-in forwards;
}

/* Toast Types - Border Left replaced with specific icon/title colors */
.toast-notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast-notification.success::before {
    background: #10b981;
}

.toast-notification.success .toast-icon {
    color: #10b981;
}

.toast-notification.error::before {
    background: #ef4444;
}

.toast-notification.error .toast-icon {
    color: #ef4444;
}

.toast-notification.warning::before {
    background: #f59e0b;
}

.toast-notification.warning .toast-icon {
    color: #f59e0b;
}

.toast-notification.info::before {
    background: #6366f1;
}

.toast-notification.info .toast-icon {
    color: #6366f1;
}

/* Toast Content */
.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
    filter: drop-shadow(0 0 8px currentColor);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.toast-message {
    color: #94a3b8;
    /* Muted text for dark mode */
    font-size: 0.875rem;
    line-height: 1.4;
    font-family: inherit;
}

.toast-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 4px;
    line-height: 1;
    transition: all 0.2s;
    margin-top: -4px;
    margin-right: -4px;
    border-radius: 4px;
}

.toast-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 4px;
    /* Offset for left border */
    right: 0;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.05);
}

.toast-progress-bar {
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    width: 100%;
    transform-origin: left;
    animation: progress linear forwards;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    #toast-container {
        top: auto;
        bottom: 20px;
        right: 16px;
        left: 16px;
        width: auto;
    }

    .toast-notification {
        transform: translateY(100%);
        animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .toast-notification.closing {
        animation: slideDown 0.3s ease-in forwards;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(120%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(120%);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}