/* 
    AlloDoctor Premium Toast Notifications
    Ultra-modern glassmorphism, smooth spring animations, progress timer, interactive state
*/

.toast-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    top: auto;
    left: auto;
    z-index: 99999;
    pointer-events: none;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    max-width: 400px;
    width: calc(100% - 32px);
}

.toast {
    position: relative;
    pointer-events: auto;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.12), 
                0 4px 12px -2px rgba(15, 23, 42, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    overflow: hidden;
    transform: translateY(24px) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.3s ease, 
                box-shadow 0.3s ease;
}

.toast:hover {
    transform: translateY(-2px) scale(1) !important;
    box-shadow: 0 24px 45px -8px rgba(15, 23, 42, 0.18), 
                0 8px 16px -4px rgba(15, 23, 42, 0.08);
}

.toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.toast.hide {
    opacity: 0;
    transform: translateY(-12px) scale(0.92);
}

/* Icon Styling */
.toast-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast:hover .toast-icon {
    transform: scale(1.08) rotate(4deg);
}

/* Content */
.toast-content {
    flex-grow: 1;
    padding-top: 2px;
}

.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 3px;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.toast-message {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.45;
    font-weight: 450;
}

/* Close Button */
.toast-close {
    background: rgba(241, 245, 249, 0.7);
    border: none;
    color: #64748b;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    margin-top: 2px;
}

.toast-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.1);
}

/* Progress Countdown Bar */
.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4.5px;
    width: 100%;
    border-radius: 0 0 18px 18px;
    background: currentColor;
    opacity: 0.85;
    transform-origin: left center;
    animation: toastProgress 5.5s linear forwards;
}

.toast:hover .toast-progress-bar {
    animation-play-state: paused;
}

@keyframes toastProgress {
    0% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}

/* Types Styling */

/* Success */
.toast-success {
    border-left: 5px solid #10b981;
}
.toast-success .toast-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}
.toast-success .toast-progress-bar {
    color: #10b981;
}

/* Error */
.toast-error {
    border-left: 5px solid #f43f5e;
}
.toast-error .toast-icon {
    background: rgba(244, 63, 94, 0.12);
    color: #e11d48;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15);
}
.toast-error .toast-progress-bar {
    color: #f43f5e;
}

/* Warning */
.toast-warning {
    border-left: 5px solid #f59e0b;
}
.toast-warning .toast-icon {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}
.toast-warning .toast-progress-bar {
    color: #f59e0b;
}

/* Info */
.toast-info {
    border-left: 5px solid #3b82f6;
}
.toast-info .toast-icon {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}
.toast-info .toast-progress-bar {
    color: #3b82f6;
}