/*
 * fofa.css
 *
 * Flash message styles only — layout and components are handled by Tailwind CSS.
 */

.message {
    display: flex;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 4px;
    border-left: 4px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 8px;
    cursor: pointer;
}

.message.hidden {
    display: none;
}

.message.error {
    background-color: #FEF2F2;
    color: #991B1B;
    border-left-color: #EF4444;
}

.message.success {
    background-color: #ECFDF5;
    color: #065F46;
    border-left-color: #10B981;
}

.message.warning {
    background-color: #FFFBEB;
    color: #92400E;
    border-left-color: #FBBF24;
}

.message:not(.error):not(.success):not(.warning) {
    background-color: #EFF6FF;
    color: #1E40AF;
    border-left-color: #1b4332;
}

/* LOGIN BANNER (inline error / warning inside card) */.login-banner {
    padding: 16px 20px 0;
}
.login-banner .message {
    margin-bottom: 0;
}

/* AUTH SUCCESS TOAST (floating, fixed, post-logout) */.auth-toast-wrap {
    position: fixed;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: max-content;
    max-width: min(440px, calc(100vw - 32px));
    animation: authToastIn 0.4s cubic-bezier(0.34, 1.4, 0.64, 1) both;
    pointer-events: none;
}
.auth-toast-wrap--out {
    animation: authToastOut 0.35s ease forwards;
}
@keyframes authToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes authToastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(-12px); }
}
.auth-toast {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 16px 20px 18px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.08),
        0 12px 32px -4px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    min-width: 300px;
    pointer-events: all;
}
.auth-toast--success::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #10B981;
    border-radius: 14px 0 0 14px;
}
.auth-toast__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-toast__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.auth-toast__title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}
.auth-toast__msg {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}
.auth-toast__close {
    flex-shrink: 0;
    align-self: flex-start;
    width: 30px;
    height: 30px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}
.auth-toast__close:hover {
    background: #e5e7eb;
    color: #374151;
}
/* Progress bar counts down the 5-second auto-dismiss */
.auth-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: #10B981;
    border-radius: 0 0 0 14px;
    transform-origin: left;
    animation: authToastProgress 5s linear forwards;
}
@keyframes authToastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}
