/* =========================
   Toast Notifications
   ========================= */

/* Toast container: centered overlay */
#toast-container {
    position: fixed;
    z-index: 9999;

    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    gap: 16px;

    width: min(600px, 94vw);
    pointer-events: none;
}

/* Optional backdrop to draw attention */
#toast-container::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: -1;
}

/* Allow clicks on the toast itself */
#toast-container .toast {
    pointer-events: auto;
}

/* Base toast */
.toast {
    background: #ffffff;
    color: #1f426c;

    border-radius: 0;
    padding: 24px 28px;

    min-width: 420px;
    max-width: 100%;

    display: flex;
    align-items: flex-start;
    gap: 16px;

    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    border: 1px solid rgba(0,0,0,0.10);
    filter: none;
    font-size: 15px;

    animation: toast-in 240ms ease-out;
}

@media (max-width: 640px) {
    .toast {
        min-width: 0;
        width: 100%;
        padding: 20px 22px;
    }
}

/* OK / ERROR variants */
.toast--ok {
    border-left-color: #2e7d32;
    background: #eaf7ee;
    color: #0f5132;
}

.toast--error {
    border-left-color: #c62828;
    background: #fdecea;
    color: #842029;

    animation: toast-in 240ms ease-out,
    toast-shake 380ms ease-in-out 120ms;
}

/* Icon */
.toast__icon {
    flex: none;
    font-size: 22px;
    line-height: 1.2;
    margin-top: 2px;
}

/* Content */
.toast__content {
    flex: 1 1 auto;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    word-break: break-word;
}

/* Close button */
.toast__close {
    flex: none;
    background: transparent;
    border: 0;
    padding: 0;

    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.8;
}

.toast__close:hover {
    opacity: 1;
}

/* Hidden state */
.toast[hidden] {
    display: none !important;
}

/* Animations */
@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.96);
    }
}

/* Shake for errors */
@keyframes toast-shake {
    0%   { transform: translateX(0); }
    20%  { transform: translateX(-6px); }
    40%  { transform: translateX(6px); }
    60%  { transform: translateX(-4px); }
    80%  { transform: translateX(4px); }
    100% { transform: translateX(0); }
}

.back-to-login {
    margin-top: 6px;
    text-align: center;
    font-size: 14px;
}

.login-actions .forgot-link {
    margin-left: 8px;
}

.forgot-submit {
    white-space: nowrap;
}