/* /setup/layout — route-specific styles. Migrated from inline <style> in views/layouts/setup.hbs on 2026-05-22. */

        /* The wizard loads design-system.css (colors/brand/shadow tokens) but NOT
           tailwind.css/brand.css, so the --text-* type scale + --radius-full
           aren't otherwise defined here. Declare them (matching brand.css) so
           every setup `var(--text-*)` resolves to the intended size instead of
           silently inheriting the body size. Scoped to the wizard only. */
        :root {
            --text-2xs: 0.65rem;
            --text-xs:  0.78rem;
            --text-sm:  0.85rem;
            --text-base: 0.95rem;
            --text-lg:  1.1rem;
            --text-xl:  1.5rem;
            --text-2xl: 2rem;
            --text-3xl: 3rem;
            --radius-full: 9999px;
        }

        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        body {
            font-family: var(--font-sans);
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            -webkit-font-smoothing: antialiased;
        }

        /* ── Top progress bar ─────────────────────────────────── */
        #setup-progress {
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 3px;
            background: var(--brand-faint);
            z-index: 200;
        }
        #setup-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--brand) 0%, var(--brand-hover) 100%);
            border-radius: 0 3px 3px 0;
            transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 0 8px var(--brand-glow);
        }

        /* ── Outer centering shell ────────────────────────────── */
        .setup-shell {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem 1.25rem 2rem;
            min-height: 100vh;
        }

        /* ── Brand mark — positioning only; the lockup visual is central
              (.brand-lockup / .brand-mark / .brand-word in design-system.css).
              Centered by .setup-shell's align-items:center. ── */
        .setup-brand {
            margin-bottom: 2rem;
        }

        /* ── The card ─────────────────────────────────────────── */
        .setup-card {
            background: var(--card);
            border-radius: 20px;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-card-hover);
            width: 100%;
            max-width: 520px;
            padding: 2.5rem;
            animation: setupEnter 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
            transform-origin: center bottom;
        }
        /* Wider variant for grid-heavy steps (e.g. the Configure product grid). */
        .setup-card.setup-card--wide { max-width: 760px; }
        /* Extra-wide — for steps with a product grid that needs horizontal room
           so it spreads into columns instead of a long vertical scroll. */
        .setup-card.setup-card--xwide { max-width: 1040px; }

        @keyframes setupEnter {
            from { opacity: 0; transform: translateY(22px) scale(0.97); }
            to   { opacity: 1; transform: translateY(0)   scale(1);    }
        }
        .setup-card.leaving {
            animation: setupLeave 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
        }
        @keyframes setupLeave {
            from { opacity: 1; transform: translateY(0)    scale(1);    }
            to   { opacity: 0; transform: translateY(-18px) scale(0.97); }
        }

        /* ── Step dots ─────────────────────────────────────────── */
        .step-dots {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0;
            margin-bottom: 2rem;
        }
        .step-dot {
            width: 30px;
            height: 30px;
            flex: 0 0 30px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 700;
            transition: background 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                        color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                        border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                        box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            z-index: 1;
        }
        /* All dots are clickable — operator can jump to any step (back or
           forward). The shared layout script handles navigation + a confirm()
           guard. The current (active) step is a no-op, so it keeps the default
           cursor. */
        .step-dot {
            cursor: pointer;
        }
        .step-dot.active {
            cursor: default;
        }
        .step-dot:not(.active):hover {
            transform: scale(1.08);
            box-shadow: 0 0 0 4px var(--brand-border);
        }
        .step-connector {
            flex-shrink: 1;          /* the connector lines absorb the squeeze instead */
        }
        .step-dot.pending {
            background: var(--brand-faint);
            color: var(--muted-light);
            border: 2px solid var(--border);
        }
        .step-dot.active {
            background: var(--brand);
            color: #fff;
            border: 2px solid var(--brand);
            box-shadow: 0 0 0 4px var(--brand-border);
        }
        .step-dot.done {
            background: var(--brand);
            color: #fff;
            border: 2px solid var(--brand);
        }
        .step-dot.done::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 50%;
            background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat;
            pointer-events: none;
        }
        .step-dot.done span { display: none; }
        .step-connector {
            width: 44px; height: 2px;
            background: var(--border);
            transition: background 0.35s ease;
        }
        .step-connector.done { background: var(--brand); }

        /* ── Step icon ─────────────────────────────────────────── */
        .step-icon {
            width: 60px; height: 60px;
            border-radius: 16px;
            background: var(--brand-faint);
            display: flex; align-items: center; justify-content: center;
            margin: 0 auto 1.5rem;
            transition: transform 0.3s ease;
        }
        .step-icon svg { display: block; color: var(--brand); }
        .step-icon svg, .card-front-icon svg { color: var(--brand); }
        .setup-card:hover .step-icon { transform: translateY(-2px); }

        /* ── Typography ────────────────────────────────────────── */
        .step-eyebrow {
            text-align: center;
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--brand);
            margin-bottom: 0.4rem;
        }
        .step-heading {
            text-align: center;
            font-size: 1.65rem;
            font-weight: 800;
            color: var(--text);
            letter-spacing: -0.03em;
            line-height: 1.2;
            margin-bottom: 0.5rem;
        }
        .step-sub {
            text-align: center;
            color: var(--muted);
            font-size: 0.9rem;
            line-height: 1.65;
            margin-bottom: 1.75rem;
        }

        /* ── Buttons ───────────────────────────────────────────── */
        .btn-primary {
            display: block;
            width: 100%;
            padding: 0.875rem 1.5rem;
            background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
            color: #fff !important;
            font-size: var(--text-base);
            font-weight: 600;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            text-align: center;
            text-decoration: none;
            box-shadow: 0 4px 14px var(--brand-glow);
            transition: transform 0.18s ease, box-shadow 0.18s ease;
            letter-spacing: -0.01em;
        }
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 7px 22px var(--brand-glow);
        }
        .btn-primary:active { transform: translateY(0); }
        .btn-primary:disabled {
            opacity: 0.65; cursor: not-allowed;
            transform: none !important;
        }

        .btn-skip {
            display: block;
            width: 100%;
            text-align: center;
            color: var(--muted);
            font-size: 0.82rem;
            text-decoration: none;
            margin-top: 0.875rem;
            padding: 0.3rem;
            transition: color 0.2s;
        }
        .btn-skip:hover { color: var(--brand); }

        /* ── Notice boxes ──────────────────────────────────────── */
        .setup-notice {
            border-radius: 10px;
            padding: 0.75rem 1rem;
            font-size: var(--text-sm);
            margin-bottom: 1.25rem;
            display: flex; align-items: flex-start; gap: 0.6rem;
            line-height: 1.5;
        }
        .setup-notice.error   { background: #fef2f2; color: var(--error);   border: 1px solid var(--danger-light); }
        .setup-notice.success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
        .setup-notice.info    { background: var(--brand-faint); color: var(--brand); border: 1px solid var(--border); }
        .setup-notice.warning { background: #fffbeb; color: var(--warning-text); border: 1px solid #fde68a; }

        /* ── Footer ────────────────────────────────────────────── */
        .setup-footer {
            margin-top: 1.5rem;
            color: var(--muted-light);
            font-size: 0.72rem;
            text-align: center;
            letter-spacing: 0.01em;
        }

        /* ── Dark mode: background ─────────────────────────────── */
        [data-theme="dark"] body {
            background: radial-gradient(ellipse at 60% 0%, var(--brand-faint) 0%, transparent 60%), var(--bg);
        }

        /* ── Responsive ────────────────────────────────────────── */
        @media (max-width: 768px) {
            /* Wizard chrome shrinks for phone. The 600px rule below keeps
               the legacy ultra-narrow values; 768px catches small tablets
               + phones in portrait. */
            .setup-shell { padding: 1rem 0.75rem; }
            .setup-brand { margin-bottom: 1.25rem; }
            .setup-card {
                padding: 1.75rem 1.25rem;
                border-radius: 16px;
                max-width: 100%;
            }
            .step-heading { font-size: var(--text-xl); }
            .step-sub { font-size: 0.88rem; margin-bottom: 1.25rem; }

            /* Step dots: smaller circles + thinner connectors so the dot row
               doesn't dominate the top of a 375px viewport. Min-width/min-height
               match width/height — without them, flex compression squishes the
               circles into ovals. */
            .step-dots { margin-bottom: 1.5rem; }
            .step-dot {
                width: 26px;
                height: 26px;
                flex: 0 0 26px;
                font-size: 0.7rem;
            }
            .step-connector { width: 28px; }

            /* Action buttons keep block-width but get tap-target height. */
            .btn-primary {
                min-height: var(--m-tap-xl);
                font-size: 1rem;
                padding: 1rem 1.5rem;
            }
            .btn-skip {
                min-height: var(--m-tap);
                padding: 0.7rem 0.5rem;
                font-size: var(--m-small);
            }

            .setup-notice { font-size: var(--m-small); padding: 0.7rem 0.85rem; }
            .setup-footer { margin-top: 1.25rem; }
        }
        @media (max-width: 600px) {
            .setup-card { padding: 1.5rem 1rem; border-radius: 14px; }
            .step-heading { font-size: 1.35rem; }
            .step-connector { width: 18px; }
        }
