﻿/* Toast container style */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Toast base style */
.toast-container .toast {
    min-width: 250px;
    margin-top: 10px;
    padding: 15px 20px;
    border-radius: 5px;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.toast-container .toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Toast types - with higher specificity */
.toast-container .toast.toast-success {
    background-color: #22c55e !important;
}

.toast-container .toast.toast-error {
    background-color: #ef4444 !important;
}

.toast-container .toast.toast-info {
    background-color: #3b82f6 !important;
}

.toast-container .toast.toast-warning {
    background-color: #f59e0b !important;
}

/* ===========================
Progress Toast (with pulse glow)
=========================== */
.toast-container .toast.toast-progress {
    background-color: #0ea5e9 !important;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.6);
    animation: pulse-progress 1.5s ease-in-out infinite;
}

@keyframes pulse-progress {
    0% {
        box-shadow: 0 0 8px rgba(14, 165, 233, 0.5);
    }

    50% {
        box-shadow: 0 0 16px rgba(14, 165, 233, 0.9);
    }

    100% {
        box-shadow: 0 0 8px rgba(14, 165, 233, 0.5);
    }
}

/* ===========================
   Spinner (outer pulse + inner rotate)
=========================== */
.toast-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    animation: spinner-pulse 1.5s ease-in-out infinite;
}

.toast-spinner .toast-spinner-inner {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spinner-pulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Close button inside toast */
.toast-container .toast {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.toast-container .toast .toast-message {
    white-space: pre-line;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.toast-container .toast .toast-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin-left: auto;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.toast-container .toast .toast-close:hover {
    opacity: 1;
}
