/* Toast — white card, ring icon, bold message (reference UI) */
.clinic-toast-stack {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: fit-content;
    max-width: min(520px, calc(100vw - 2rem));
    pointer-events: none;
}

.clinic-toast {
    pointer-events: auto;
    width: fit-content;
    max-width: 100%;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
    padding: 1.125rem 1.25rem 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: none;
    animation: clinicToastIn 0.35s ease-out;
}

@keyframes clinicToastIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clinic-toast.is-hiding {
    animation: clinicToastOut 0.25s ease-in forwards;
}

@keyframes clinicToastOut {
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

.clinic-toast__icon {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 1;
    background: #ffffff;
    border: 2px solid #d1fae5;
    color: #10b981;
}

.clinic-toast--success .clinic-toast__icon {
    border-color: #bbf7d0;
    color: #059669;
}

.clinic-toast--danger .clinic-toast__icon {
    border-color: #fecaca;
    color: #dc2626;
}

.clinic-toast--warning .clinic-toast__icon {
    border-color: #fde68a;
    color: #d97706;
}

.clinic-toast--info .clinic-toast__icon,
.clinic-toast--primary .clinic-toast__icon {
    border-color: #bfdbfe;
    color: #2563eb;
}

.clinic-toast__message {
    flex: 0 1 auto;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #3d4a5c;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    letter-spacing: -0.01em;
}

.clinic-toast__close {
    display: none !important;
}

.clinic-toast__progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: transparent;
    pointer-events: none;
}

.clinic-toast__progress-bar {
    display: block;
    height: 100%;
    width: 35%;
    max-width: 120px;
    margin-left: 0;
    background: #cbd5e1;
    border-radius: 0 2px 0 0;
    transform: scaleX(1);
    transform-origin: left center;
}

/* Inline message cards (login errors, form hints) */
.clinic-alert-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
    border: none;
    padding: 1rem 1.15rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.clinic-alert-card .clinic-toast__icon {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    font-size: 1.35rem;
}

.clinic-alert-card .clinic-toast__message {
    font-size: 0.9rem;
}

[data-bs-theme="dark"] .clinic-toast,
[data-theme="dark"] .clinic-toast,
[data-bs-theme="dark"] .clinic-alert-card,
[data-theme="dark"] .clinic-alert-card {
    background: #252830;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .clinic-toast__message,
[data-theme="dark"] .clinic-toast__message {
    color: #e8eaed;
}

[data-bs-theme="dark"] .clinic-toast__icon,
[data-theme="dark"] .clinic-toast__icon {
    background: #252830;
}
