/* ════════════════════════════════════════════════════════════════
   Mobile CTA Bar — Fixed bottom bar (mobile only)
   Appears when user is NOT viewing #planos section.
   Premium glass effect + micro-interactions.
   ════════════════════════════════════════════════════════════════ */

/* ── Desktop/Tablet: completely hidden ── */
.mobile-cta-bar {
    display: none;
}

/* ── Mobile only ── */
@media (max-width: 767.98px) {

    /* ── A) Bar container — glass scrim ── */
    .mobile-cta-bar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 990;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.72);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
        border-top: 1px solid rgba(var(--mp-primary-rgb), 0.07);
        box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.05),
                    0 -1px 3px rgba(0, 0, 0, 0.03);

        /* ── Hidden state (default) ── */
        transform: translateY(calc(100% + 16px));
        opacity: 0;
        pointer-events: none;

        /* ── Transition: snappy spring-like ── */
        transition: transform 240ms cubic-bezier(0.22, 0.68, 0, 1.04),
                    opacity 200ms ease;
        will-change: transform, opacity;
    }

    /* ── B) Visible state (JS toggles .is-visible) ── */
    .mobile-cta-bar.is-visible {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* ── C) Inner wrapper — constrains button width ── */
    .mobile-cta-bar__inner {
        max-width: 480px;
        margin: 0 auto;
    }

    /* ── D) CTA Button — premium orange with sheen ── */
    .mobile-cta-bar__btn {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 48px;
        min-height: 48px;
        padding: 0 24px;
        font-family: 'Inter', sans-serif;
        font-size: 0.9375rem;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        text-decoration: none;
        color: #fff;
        background-color: var(--mp-accent, #F97316);
        border: none;
        border-radius: var(--mp-radius-btn, 14px);
        box-shadow: 0 3px 12px rgba(var(--mp-accent-rgb, 249, 115, 22), 0.28),
                    inset 0 1px 0 rgba(255, 255, 255, 0.12);
        cursor: pointer;
        overflow: hidden;
        -webkit-tap-highlight-color: transparent;
        transition: box-shadow 0.2s ease,
                    transform 0.15s ease;
    }

    /* ── Sheen overlay (very subtle diagonal highlight) ── */
    .mobile-cta-bar__btn::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient(
            105deg,
            rgba(255, 255, 255, 0.18) 0%,
            rgba(255, 255, 255, 0) 45%,
            rgba(255, 255, 255, 0) 55%,
            rgba(255, 255, 255, 0.06) 100%
        );
        opacity: 1;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    /* ── Hover: glow lift ── */
    .mobile-cta-bar__btn:hover {
        color: #fff;
        text-decoration: none;
        box-shadow: 0 5px 18px rgba(var(--mp-accent-rgb, 249, 115, 22), 0.36),
                    inset 0 1px 0 rgba(255, 255, 255, 0.14);
        transform: translateY(-1px);
    }
    .mobile-cta-bar__btn:hover::before {
        opacity: 0.6;
    }

    /* ── Active: press down ── */
    .mobile-cta-bar__btn:active {
        transform: translateY(1px) scale(0.99);
        box-shadow: 0 1px 6px rgba(var(--mp-accent-rgb, 249, 115, 22), 0.22),
                    inset 0 1px 0 rgba(255, 255, 255, 0.10);
    }

    /* ── Focus-visible: accessible ring ── */
    .mobile-cta-bar__btn:focus-visible {
        outline: 3px solid rgba(var(--mp-accent-rgb, 249, 115, 22), 0.50);
        outline-offset: 3px;
    }

    /* ── E) Body padding when bar is visible ── */
    body.has-mobile-cta-bar {
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }

    /* ── F) Back-to-top button: move up when bar is active ── */
    body.has-mobile-cta-bar .back-to-top {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        transition: bottom 0.24s ease;
    }

    /* ── G) Dark mode ── */
    [data-theme="dark"] .mobile-cta-bar {
        background: rgba(11, 18, 32, 0.78);
        border-top-color: rgba(148, 163, 184, 0.09);
        box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.25),
                    0 -1px 3px rgba(0, 0, 0, 0.15);
    }

    [data-theme="dark"] .mobile-cta-bar__btn {
        box-shadow: 0 3px 12px rgba(var(--mp-accent-rgb, 249, 115, 22), 0.22),
                    inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    [data-theme="dark"] .mobile-cta-bar__btn:hover {
        box-shadow: 0 5px 18px rgba(var(--mp-accent-rgb, 249, 115, 22), 0.30),
                    inset 0 1px 0 rgba(255, 255, 255, 0.10);
    }

    [data-theme="dark"] .mobile-cta-bar__btn:active {
        box-shadow: 0 1px 6px rgba(var(--mp-accent-rgb, 249, 115, 22), 0.18),
                    inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    /* ── H) Reduced motion ── */
    @media (prefers-reduced-motion: reduce) {
        .mobile-cta-bar {
            transition: none;
        }
        .mobile-cta-bar__btn {
            transition: none;
        }
        .mobile-cta-bar__btn::before {
            transition: none;
        }
        body.has-mobile-cta-bar .back-to-top {
            transition: none;
        }
    }
}
