/* Self-contained styling for the public Tech Support Flow.
   Deliberately NOT built with the Filament/admin Tailwind pipeline — this page
   is independent so it never depends on the precompiled admin theme. Plain CSS,
   no build step. */

:root {
    --sf-bg-1: #4f46e5;
    --sf-bg-2: #7c3aed;
    --sf-ink: #111827;
    --sf-muted: #6b7280;
    --sf-line: #e5e7eb;
    --sf-primary: #4f46e5;
    --sf-primary-ink: #ffffff;
    --sf-card: #ffffff;
    --sf-radius: 18px;
    --sf-shadow: 0 24px 60px -20px rgba(31, 27, 90, 0.45);
    font-family: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    color: var(--sf-ink);
    background: linear-gradient(135deg, var(--sf-bg-1), var(--sf-bg-2));
    -webkit-font-smoothing: antialiased;
}

.sf-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 18px;
}

.sf-card {
    width: 100%;
    /* Mobile is full-width (width:100%), so this cap only affects larger screens —
       roomier on laptop/desktop so articles and actions are easy to read. */
    max-width: 720px;
    background: var(--sf-card);
    border-radius: var(--sf-radius);
    box-shadow: var(--sf-shadow);
    overflow: hidden;
}

.sf-progress {
    height: 5px;
    background: #eef2ff;
}
.sf-progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--sf-bg-1), var(--sf-bg-2));
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.sf-body {
    padding: 34px 32px 36px;
}

.sf-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
    font-size: 14px;
    color: var(--sf-muted);
    margin-bottom: 22px;
}
.sf-brand .sf-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: linear-gradient(135deg, var(--sf-bg-1), var(--sf-bg-2));
}

[x-cloak] { display: none !important; }

.sf-greeting {
    font-size: clamp(26px, 6vw, 34px);
    font-weight: 800;
    color: var(--sf-ink);
    margin: 0 0 18px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.sf-wave {
    display: inline-block;
    transform-origin: 70% 70%;
    animation: sf-wave 2.2s ease-in-out 1;
}
@keyframes sf-wave {
    0%, 60%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(14deg); }
    20%, 40% { transform: rotate(-8deg); }
}

.sf-eyebrow {
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sf-primary);
    margin: 0 0 10px;
}

.sf-title {
    font-size: 25px;
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.sf-sub {
    font-size: 15px;
    line-height: 1.6;
    color: var(--sf-muted);
    margin: 0 0 22px;
}

/* Tabs */
.sf-tabs {
    display: flex;
    gap: 6px;
    background: #f3f4f6;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 22px;
}
.sf-tabs button {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 10px 12px;
    border-radius: 9px;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    color: var(--sf-muted);
    cursor: pointer;
    transition: all 0.18s ease;
}
.sf-tabs button.is-active {
    background: #ffffff;
    color: var(--sf-ink);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Inputs */
.sf-field { margin-bottom: 16px; }
.sf-input {
    width: 100%;
    border: 1.5px solid var(--sf-line);
    border-radius: 12px;
    padding: 14px 16px;
    font: inherit;
    font-size: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sf-input:focus {
    outline: none;
    border-color: var(--sf-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
}
.sf-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Buttons */
.sf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 15px 18px;
    font: inherit;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    background: var(--sf-primary);
    color: var(--sf-primary-ink);
    transition: transform 0.08s ease, filter 0.15s ease;
    text-decoration: none;
}
.sf-btn:hover { filter: brightness(1.06); }
.sf-btn:active { transform: translateY(1px); }
.sf-btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Option list (Typeform-style answer buttons) */
.sf-options { display: flex; flex-direction: column; gap: 11px; margin-top: 6px; }
.sf-search { margin-bottom: 4px; }
.sf-nomatch { font-size: 14px; color: var(--sf-muted); text-align: center; padding: 8px 0; }
.sf-option {
    text-align: left;
    width: 100%;
    border: 1.5px solid var(--sf-line);
    background: #fff;
    border-radius: 13px;
    padding: 16px 18px;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    color: var(--sf-ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.15s ease;
}
.sf-option:hover {
    border-color: var(--sf-primary);
    background: #f5f3ff;
    transform: translateX(2px);
}
.sf-option .sf-key {
    flex: 0 0 auto;
    min-width: 26px; height: 26px; padding: 0 5px; box-sizing: border-box;
    border-radius: 7px;
    border: 1px solid var(--sf-line);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; color: var(--sf-muted);
    background: #f9fafb;
}

/* Footer / meta */
.sf-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 22px;
}
.sf-back {
    border: 0; background: transparent; cursor: pointer;
    color: var(--sf-muted); font: inherit; font-size: 14px; font-weight: 600;
    padding: 6px 0;
}
.sf-back:hover { color: var(--sf-ink); }

.sf-notice {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: 12px;
    padding: 13px 15px;
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 18px;
    text-align: left;
    white-space: pre-wrap;   /* keep the admin's line breaks exactly as written */
}
/* Admin note shown on its own lines, under a label, preserving its formatting. */
.sf-note { display: block; white-space: pre-wrap; margin-top: 4px; }
.sf-error { color: #dc2626; font-size: 13px; margin-top: 6px; }
.sf-notice-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
/* Positive feedback variant (e.g. "we've emailed your PIN"). */
.sf-notice.is-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }

/* Secondary line under the Continue button (e.g. "Don't have a PIN? Request one"). */
.sf-alt { font-size: 14px; color: var(--sf-muted); margin: 16px 0 0; text-align: center; }
.sf-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--sf-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.sf-link:hover { opacity: 0.8; }

/* Request form */
.sf-form { text-align: left; margin-top: 4px; }
.sf-q { display: block; font-size: 14px; font-weight: 600; color: var(--sf-ink); margin-bottom: 8px; }
.sf-req { color: #dc2626; margin-left: 3px; }
.sf-choices { display: flex; flex-direction: column; gap: 8px; }
.sf-choices-row { flex-direction: row; gap: 18px; }
.sf-choice { display: flex; align-items: center; gap: 9px; font-size: 15px; color: var(--sf-ink);
    border: 1.5px solid var(--sf-line); border-radius: 11px; padding: 11px 14px; cursor: pointer; }
.sf-choices-row .sf-choice { flex: 1; justify-content: center; }
.sf-choice:hover { border-color: var(--sf-primary); background: #f5f3ff; }
.sf-choice input { width: 17px; height: 17px; accent-color: var(--sf-primary); }

/* Submitted answers summary */
.sf-answers { text-align: left; margin-top: 18px; border: 1px solid var(--sf-line); border-radius: 12px; overflow: hidden; }
.sf-answer { padding: 12px 16px; border-bottom: 1px solid var(--sf-line); }
.sf-answer:last-child { border-bottom: none; }
.sf-answer-q { display: block; font-size: 12px; font-weight: 600; color: var(--sf-muted); margin-bottom: 3px; }
.sf-answer-a { display: block; font-size: 15px; color: var(--sf-ink); white-space: pre-wrap; }

/* Request status: badge + 3-step tracker */
.sf-status { margin: 6px 0 20px; }
.sf-status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
    border-radius: 999px; font-size: 14px; font-weight: 700; }
.sf-status-review { background: #fef3c7; color: #92400e; }
.sf-status-ok { background: #dcfce7; color: #166534; }
.sf-status-no { background: #fee2e2; color: #991b1b; }
.sf-status-ic { font-size: 12px; line-height: 1; }
.sf-status-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; display: inline-block; }
.sf-status-msg { font-size: 15px; color: var(--sf-muted); margin: 14px 0 0; line-height: 1.65; }
.sf-pulse { animation: sfPulse 1.4s ease-in-out infinite; }
@keyframes sfPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.55); } }

.sf-steps { display: flex; align-items: flex-start; margin: 24px 0 4px; }
.sf-step { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 0 0 auto; width: 86px; }
.sf-step-dot { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center;
    justify-content: center; font-size: 14px; font-weight: 700; background: #eef0f4; color: #9ca3af;
    border: 2px solid #e5e7eb; transition: all .2s; }
.sf-step-label { font-size: 12px; font-weight: 600; color: #9ca3af; text-align: center; line-height: 1.3; }
.sf-step.is-done .sf-step-dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.sf-step.is-done .sf-step-label { color: var(--sf-ink); }
.sf-step.is-active .sf-step-dot { background: #fff; border-color: #f59e0b; color: #b45309;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); animation: sfRing 1.8s ease-in-out infinite; }
.sf-step.is-active .sf-step-label { color: #92400e; }
.sf-step.is-ok .sf-step-dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.sf-step.is-no .sf-step-dot { background: #dc2626; border-color: #dc2626; color: #fff; }
.sf-step.is-ok .sf-step-label, .sf-step.is-no .sf-step-label { color: var(--sf-ink); }
.sf-step-line { flex: 1 1 auto; height: 3px; background: #e5e7eb; border-radius: 2px; margin-top: 14px; }
.sf-step-line.is-done { background: #16a34a; }
@keyframes sfRing { 0%, 100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); } 50% { box-shadow: 0 0 0 7px rgba(245, 158, 11, .08); } }

/* Ticket badge */
.sf-ticket {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #eef2ff;
    color: var(--sf-primary);
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 16px;
    margin-bottom: 20px;
}
.sf-copy {
    border: 0; background: rgba(79,70,229,0.12); color: var(--sf-primary);
    border-radius: 8px; padding: 5px 9px; font: inherit; font-size: 12px;
    font-weight: 600; cursor: pointer;
}

/* Result / status */
.sf-status-icon {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; margin-bottom: 18px;
}
.sf-status-ok { background: #dcfce7; color: #16a34a; }
.sf-status-warn { background: #fef9c3; color: #ca8a04; }
.sf-status-fail { background: #fee2e2; color: #dc2626; }

.sf-preview {
    border: 1px solid var(--sf-line);
    border-radius: 12px;
    padding: 16px 18px;
    margin-top: 18px;
    max-height: 320px;
    overflow: auto;
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
}
.sf-preview img { max-width: 100%; height: auto; }
.sf-preview h1, .sf-preview h2, .sf-preview h3 { line-height: 1.3; }
.sf-preview a { color: var(--sf-primary); }

.sf-meta { font-size: 13px; color: var(--sf-muted); margin-top: 16px; }

/* Monthly 1-on-1 call allowance, shown as three labelled stats */
.sf-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0 6px;
}
.sf-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 8px;
    border: 1px solid var(--sf-line);
    border-radius: 14px;
    background: #f9fafb;
    text-align: center;
}
.sf-stat-num { font-size: 26px; font-weight: 800; line-height: 1; color: var(--sf-ink); }
.sf-stat-label { font-size: 12px; font-weight: 600; color: var(--sf-muted); }
.sf-stat-accent { background: #eef2ff; border-color: #c7d2fe; }
.sf-stat-accent .sf-stat-num { color: var(--sf-primary); }
.sf-stat-empty { background: #fef2f2; border-color: #fecaca; }
.sf-stat-empty .sf-stat-num { color: #dc2626; }
.sf-stat-caption { font-size: 12px; color: var(--sf-muted); margin: 0 0 4px; }

/* Optional rich-text instructions on an action screen (e.g. before a Calendly booking) */
.sf-instructions {
    text-align: left;
    margin: 14px 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--sf-line);
    border-radius: 12px;
    background: #f9fafb;
    font-size: 15px;
    line-height: 1.65;
    color: #1f2937;
    max-height: 40vh;
    overflow: auto;
}
.sf-instructions > :first-child { margin-top: 0; }
.sf-instructions > :last-child { margin-bottom: 0; }
.sf-instructions p { margin: 0 0 .8em; }
.sf-instructions ul, .sf-instructions ol { margin: 0 0 .8em; padding-left: 20px; }
.sf-instructions li { margin: .25em 0; }
.sf-instructions a { color: var(--sf-primary); }
.sf-instructions strong { font-weight: 700; }
.sf-instructions h1, .sf-instructions h2, .sf-instructions h3 { margin: .6em 0 .3em; color: #111827; }

/* Article shown like the branded email so it reads in full */
.sf-article {
    border: 1px solid var(--sf-line);
    border-radius: 14px;
    overflow: hidden;
    margin: 18px 0 16px;
    text-align: left;
    box-shadow: 0 8px 24px -16px rgba(31, 27, 90, 0.35);
}
.sf-article-head {
    background: linear-gradient(135deg, var(--sf-bg-1), var(--sf-bg-2));
    color: #fff;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 600;
}
.sf-article-body {
    padding: 22px 20px;
    font-size: 15px;
    line-height: 1.7;
    color: #1f2937;
    max-height: 60vh;
    overflow: auto;
}
.sf-article-body h1, .sf-article-body h2, .sf-article-body h3 { color: #111827; line-height: 1.3; margin: 1.2em 0 .4em; }
.sf-article-body h1 { font-size: 21px; }
.sf-article-body h2 { font-size: 18px; }
.sf-article-body h3 { font-size: 16px; }
.sf-article-body p { margin: 0 0 1em; }
.sf-article-body ul, .sf-article-body ol { margin: 0 0 1em; padding-left: 22px; }
.sf-article-body li { margin: .3em 0; }
.sf-article-body a { color: var(--sf-primary); }
.sf-article-body img { max-width: 100%; height: auto; border-radius: 8px; }
.sf-article-body blockquote { border-left: 3px solid #d1d5db; margin: 0 0 1em; padding: .25em 0 .25em 14px; color: #4b5563; }
.sf-article-body code { background: #f3f4f6; padding: 2px 5px; border-radius: 4px; font-size: 13px; }

/* Secondary button (e.g. "send the article to my email") */
.sf-btn-soft { background: #eef2ff; color: var(--sf-primary); }
.sf-btn-soft:hover { filter: none; background: #e0e7ff; }
/* Icon + text inside a button / meta line — keeps the SVG crisp and full-size on mobile. */
.sf-btn-label { display: inline-flex; align-items: center; gap: 8px; }
.sf-meta-icon { display: inline-flex; align-items: center; gap: 6px; }
.sf-btn-label svg, .sf-meta-icon svg { flex: 0 0 auto; }
.sf-meta-icon svg { color: #16a34a; }

/* Centered hint line with an icon (e.g. "You can send 3 more emails today!") */
.sf-hint {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 13px; color: var(--sf-muted); margin-top: 12px; text-align: center;
}
.sf-hint svg { flex: 0 0 auto; color: var(--sf-primary); }

/* Loading state */
[wire\:loading] { }
.sf-spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.5); border-top-color: #fff;
    border-radius: 50%; animation: sf-spin 0.7s linear infinite;
}
@keyframes sf-spin { to { transform: rotate(360deg); } }

/* Entrance animation between steps */
.sf-animate { animation: sf-fade 0.4s ease both; }
@keyframes sf-fade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .sf-body { padding: 26px 20px 30px; }
    .sf-title { font-size: 22px; }
}

/* Roomier reading on laptop/desktop, matching the wider card. */
@media (min-width: 640px) {
    .sf-body { padding: 40px 44px 44px; }
    .sf-title { font-size: 27px; }
}
