/**
 * Dashboard Onboarding Popup Styles
 * 新手指引彈窗樣式（非 Tailwind 部分）
 *
 * NOTE: #onboarding-overlay and #onboarding-banner live OUTSIDE
 * <div class="freelix-dashboard">, so Tailwind's scoped utilities
 * (.freelix-dashboard .util) do not apply to these root elements.
 * All positioning / visibility / background styles for the outer
 * wrappers must live here.
 */

/* ── Fallback Banner ─────────────────────────────────────────────────────── */
#onboarding-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none; /* shown as flex by JS */
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(to right, #2979FF, #1E61D9);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

#onboarding-banner.flex {
    display: flex;
}

#onboarding-banner button {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    padding: 0;
}

#onboarding-banner .banner-cta {
    font-weight: 600;
    text-decoration: underline;
    margin-left: 4px;
}

#onboarding-banner .banner-cta:hover {
    text-decoration: none;
}

#onboarding-banner .banner-close {
    opacity: 0.8;
    font-size: 20px;
    line-height: 1;
}

#onboarding-banner .banner-close:hover {
    opacity: 1;
}

/* ── Popup Overlay ───────────────────────────────────────────────────────── */
#onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#onboarding-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ── Modal Card ──────────────────────────────────────────────────────────── */
#onboarding-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 512px;
    overflow: hidden;
    transform: translateY(24px);
    transition: transform 0.3s ease;
}

#onboarding-overlay.active #onboarding-modal {
    transform: translateY(0);
}

/* ── Step animations ─────────────────────────────────────────────────────── */
.onboarding-step {
    animation: stepFadeIn 0.25s ease;
}

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Shake for unverified skip attempt */
.popup-shake {
    animation: guideShake 0.45s ease;
}

@keyframes guideShake {
    0%,100% { transform: translateX(0); }
    20%,60% { transform: translateX(-6px); }
    40%,80% { transform: translateX(6px); }
}

/* ── Progress dots ───────────────────────────────────────────────────────── */
.onboarding-dot.active {
    width: 20px !important;
    border-radius: 4px !important;
}

/* ── Mobile bottom-sheet ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    #onboarding-overlay {
        align-items: flex-end;
        padding: 0;
    }

    #onboarding-modal {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        max-width: 100%;
    }
}
