/* ============================================
 * AuthMe — Toaster Notification Styles
 * ============================================
 *
 * Top-right stacking toast notifications with
 * slide-in / fade-out animations.
 *
 * @package AuthMe
 * ============================================ */

/* ── Container ───────────────────────────── */
.authme-toaster-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 380px;
    width: 100%;
}

/* ── Individual Toast ────────────────────── */
.authme-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1),
                0 2px 8px rgba(0, 0, 0, 0.04);
    pointer-events: auto;
    animation: authmeToastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border-left: 4px solid transparent;
    overflow: hidden;
    position: relative;
}

/* ── Toast Types ─────────────────────────── */
.authme-toast.authme-toast-success {
    border-left-color: var(--authme-success);
}

.authme-toast.authme-toast-error {
    border-left-color: var(--authme-error);
}

.authme-toast.authme-toast-warning {
    border-left-color: var(--authme-warning);
}

.authme-toast.authme-toast-info {
    border-left-color: var(--authme-info);
}

/* ── Toast Icon ──────────────────────────── */
.authme-toast-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-top: 1px;
}

.authme-toast-success .authme-toast-icon {
    background-color: var(--authme-success-bg);
    color: var(--authme-success);
}

.authme-toast-error .authme-toast-icon {
    background-color: var(--authme-error-bg);
    color: var(--authme-error);
}

.authme-toast-warning .authme-toast-icon {
    background-color: var(--authme-warning-bg);
    color: var(--authme-warning);
}

.authme-toast-info .authme-toast-icon {
    background-color: var(--authme-info-bg);
    color: var(--authme-info);
}

/* ── Toast Message ───────────────────────── */
.authme-toast-message {
    flex: 1;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--authme-text-main);
    font-weight: 500;
}

/* ── Toast Close ─────────────────────────── */
.authme-toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--authme-text-muted);
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-size: 16px;
    line-height: 1;
}

.authme-toast-close:hover {
    background-color: var(--authme-bg);
    color: var(--authme-text-main);
}

/* ── Progress bar (auto-dismiss indicator) ── */
.authme-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 0 12px;
    animation: authmeToastProgress linear forwards;
}

.authme-toast-success .authme-toast-progress {
    background-color: var(--authme-success);
}

.authme-toast-error .authme-toast-progress {
    background-color: var(--authme-error);
}

.authme-toast-warning .authme-toast-progress {
    background-color: var(--authme-warning);
}

.authme-toast-info .authme-toast-progress {
    background-color: var(--authme-info);
}

/* ── Animations ──────────────────────────── */
@keyframes authmeToastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.authme-toast.authme-toast-leaving {
    animation: authmeToastFadeOut 0.3s ease forwards;
}

@keyframes authmeToastFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

@keyframes authmeToastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 480px) {
    .authme-toaster-container {
        right: 10px;
        left: 10px;
        max-width: none;
        width: auto;
    }
}
