/* ============================================================
   Lexa SEO Spec Form — Stylesheet v4
   ============================================================
   ארכיטקטורה חדשה: שאלה אחת בכל פעם (One-Question-Per-Screen).
   - כל ה-CSS scoped תחת #lexa-seo-spec
   - הפונט יורש מהאתר המארח (font-family: inherit)
   - Mobile-first, hover רק במכשירים עם עכבר
   - שאלה ממורכזת אנכית במסך — בלי גלילה (פרט לאופציות ארוכות)
   - Navigation bar קבוע למטה
   ============================================================ */

/* ─── Scoped Variables ─── */
#lexa-seo-spec {
    --lx-primary: #0d9488;
    --lx-primary-dark: #0f766e;
    --lx-primary-darker: #115e59;
    --lx-primary-light: #5eead4;
    --lx-primary-soft: #f0fdfa;
    --lx-primary-tint: #ccfbf1;

    --lx-accent: #f59e0b;
    --lx-accent-dark: #d97706;
    --lx-accent-soft: #fef3c7;

    --lx-warning: #dc2626;
    --lx-warning-soft: #fef2f2;
    --lx-good: #16a34a;
    --lx-good-soft: #f0fdf4;

    --lx-text: #1e293b;
    --lx-text-soft: #475569;
    --lx-text-muted: #64748b;
    --lx-text-faint: #94a3b8;

    --lx-bg: #fafaf9;
    --lx-paper: #ffffff;
    --lx-line: #e2e8f0;
    --lx-line-soft: #f1f5f9;

    --lx-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --lx-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --lx-shadow-md: 0 8px 24px rgba(13, 148, 136, 0.08);
    --lx-shadow-lg: 0 16px 48px rgba(13, 148, 136, 0.12);
    --lx-shadow-focus: 0 0 0 4px rgba(13, 148, 136, 0.18);

    --lx-radius-sm: 8px;
    --lx-radius-md: 12px;
    --lx-radius-lg: 16px;
    --lx-radius-xl: 20px;
    --lx-radius-full: 999px;

    --lx-nav-height: 76px;

    font-family: inherit;
    direction: rtl;
    line-height: 1.6;
    color: var(--lx-text);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    position: relative;
}

#lexa-seo-spec *,
#lexa-seo-spec *::before,
#lexa-seo-spec *::after {
    box-sizing: border-box;
}

#lexa-seo-spec ul,
#lexa-seo-spec ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ─── Screens ─── */
#lexa-seo-spec .screen { display: none; }
#lexa-seo-spec .screen.active { display: block; }

/* ═══════════════════════════════════════════════════════════
   LANDING SCREEN
   ═══════════════════════════════════════════════════════════ */
#lexa-seo-spec .screen-landing {
    padding: 40px 16px 56px;
    background: var(--lx-bg);
}

#lexa-seo-spec .landing-container {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

#lexa-seo-spec .landing-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--lx-text);
    line-height: 1.25;
    margin: 0 0 18px;
    letter-spacing: -0.5px;
}

#lexa-seo-spec .landing-title em {
    color: var(--lx-primary);
    font-style: normal;
    background: linear-gradient(180deg, transparent 65%, var(--lx-accent-soft) 65%);
    padding: 0 4px;
}

#lexa-seo-spec .landing-subtitle {
    font-size: 16px;
    color: var(--lx-text-soft);
    line-height: 1.7;
    margin: 0 auto 28px;
    max-width: 600px;
}

#lexa-seo-spec .landing-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0 auto 24px;
    max-width: 600px;
}

#lexa-seo-spec .feature {
    background: var(--lx-paper);
    padding: 18px 20px;
    border-radius: var(--lx-radius-lg);
    border: 1px solid var(--lx-line);
    text-align: right;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    align-items: start;
    transition: border-color 0.2s, box-shadow 0.2s;
}

@media (hover: hover) {
    #lexa-seo-spec .feature:hover {
        border-color: var(--lx-primary-light);
        box-shadow: var(--lx-shadow-sm);
    }
}

#lexa-seo-spec .feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--lx-radius-md);
    background: var(--lx-primary-soft);
    color: var(--lx-primary);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#lexa-seo-spec .feature-title {
    font-weight: 700;
    color: var(--lx-text);
    font-size: 16px;
    margin-bottom: 4px;
    line-height: 1.3;
}

#lexa-seo-spec .feature-text {
    font-size: 14px;
    color: var(--lx-text-soft);
    line-height: 1.55;
}

#lexa-seo-spec .landing-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--lx-text-soft);
    margin-bottom: 22px;
    padding: 10px 18px;
    background: var(--lx-primary-soft);
    border-radius: var(--lx-radius-full);
}

#lexa-seo-spec .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

#lexa-seo-spec .dot-good { background: var(--lx-good); }

#lexa-seo-spec .draft-banner {
    margin: 22px auto 0;
    max-width: 600px;
    padding: 18px 20px;
    background: var(--lx-paper);
    border-radius: var(--lx-radius-lg);
    border: 1px solid var(--lx-line);
    border-right: 4px solid var(--lx-accent);
    box-shadow: var(--lx-shadow-sm);
    text-align: right;
}

#lexa-seo-spec .draft-text {
    font-size: 15px;
    color: var(--lx-text);
    margin-bottom: 12px;
    line-height: 1.5;
}

#lexa-seo-spec .draft-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS — Generic
   ═══════════════════════════════════════════════════════════ */
#lexa-seo-spec .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border: none;
    border-radius: var(--lx-radius-md);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    line-height: 1.2;
    min-height: 48px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

#lexa-seo-spec .btn-primary {
    background: var(--lx-primary);
    color: white;
    box-shadow: var(--lx-shadow-sm);
}

@media (hover: hover) {
    #lexa-seo-spec .btn-primary:hover {
        background: var(--lx-primary-dark);
        box-shadow: var(--lx-shadow-md);
    }
}

#lexa-seo-spec .btn-primary:active {
    background: var(--lx-primary-darker);
}

#lexa-seo-spec .btn-secondary {
    background: var(--lx-paper);
    color: var(--lx-text);
    border: 1.5px solid var(--lx-line);
}

@media (hover: hover) {
    #lexa-seo-spec .btn-secondary:hover {
        background: var(--lx-bg);
        border-color: var(--lx-text-faint);
    }
}

#lexa-seo-spec .btn-text {
    background: transparent;
    color: var(--lx-text-soft);
    padding: 10px 16px;
    min-height: 40px;
    font-weight: 500;
    font-size: 14px;
    border: none;
}

@media (hover: hover) {
    #lexa-seo-spec .btn-text:hover {
        color: var(--lx-primary);
        background: var(--lx-primary-soft);
    }
}

#lexa-seo-spec .btn-large {
    padding: 16px 32px;
    font-size: 16px;
    min-height: 54px;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
}

@media (hover: hover) {
    #lexa-seo-spec .btn-large:hover {
        box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35);
    }
}

#lexa-seo-spec .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#lexa-seo-spec .btn:focus-visible {
    outline: none;
    box-shadow: var(--lx-shadow-focus);
}

/* ═══════════════════════════════════════════════════════════
   FORM SCREEN — מבנה חדש: header + main + footer-nav
   ═══════════════════════════════════════════════════════════ */
#lexa-seo-spec .screen-form {
    background: var(--lx-bg);
    /* גובה מינימלי + flex column מופעלים רק כשה-screen פעיל */
}

#lexa-seo-spec .screen-form.active {
    /* גובה לפי ה-viewport (אבל מינימום סביר) - מאפשר שאלה ממורכזת */
    min-height: min(680px, calc(100vh - 80px));
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ── Header עם פס התקדמות — דק יותר מבעבר ── */
#lexa-seo-spec .form-header {
    background: var(--lx-paper);
    border-bottom: 1px solid var(--lx-line);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#lexa-seo-spec .form-header-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 14px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
}

#lexa-seo-spec .brand-small {
    font-size: 12px;
    letter-spacing: 2.5px;
    font-weight: 800;
    color: var(--lx-primary);
}

#lexa-seo-spec .progress-container {
    /* פס התקדמות מילוי — text קטן, פס דק */
}

#lexa-seo-spec .progress-text {
    font-size: 11.5px;
    color: var(--lx-text-muted);
    margin-bottom: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

#lexa-seo-spec .progress-step-name {
    color: var(--lx-text);
    font-weight: 600;
}

#lexa-seo-spec .progress-divider {
    color: var(--lx-text-faint);
}

#lexa-seo-spec .progress-text strong {
    color: var(--lx-primary);
    font-weight: 700;
}

#lexa-seo-spec .progress-hint {
    color: var(--lx-text-faint);
    font-weight: 400;
    margin-right: auto;
}

#lexa-seo-spec .progress-bar {
    height: 4px;
    background: var(--lx-line);
    border-radius: var(--lx-radius-full);
    overflow: hidden;
}

#lexa-seo-spec .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--lx-primary), var(--lx-primary-dark));
    border-radius: var(--lx-radius-full);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#lexa-seo-spec .save-indicator {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--lx-good);
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: 500;
}

#lexa-seo-spec .save-indicator.visible { opacity: 1; }

#lexa-seo-spec .save-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lx-good);
}

/* ── Main area — תופס את כל המקום הזמין, ממורכז ── */
#lexa-seo-spec .form-main {
    flex: 1;
    max-width: 660px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 18px calc(var(--lx-nav-height) + 24px);
    /* padding-bottom גדול כדי שה-nav הקבוע לא יסתיר תוכן */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
}

/* ─── Step Banner — מופיע בשאלה הראשונה של שלב חדש ─── */
#lexa-seo-spec .step-banner {
    background: linear-gradient(135deg, var(--lx-primary-soft), var(--lx-primary-tint));
    border: 1px solid var(--lx-primary-light);
    border-radius: var(--lx-radius-lg);
    padding: 18px 20px;
    margin-bottom: 22px;
    animation: lx-fadeIn 0.35s ease;
}

#lexa-seo-spec .step-banner-content {
    text-align: right;
}

#lexa-seo-spec .step-banner-number {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--lx-primary);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

#lexa-seo-spec .step-banner-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--lx-primary-darker);
    margin: 0 0 4px;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

#lexa-seo-spec .step-banner-subtitle {
    font-size: 13.5px;
    color: var(--lx-text-soft);
    margin: 0;
    line-height: 1.5;
}

/* ─── Step container — שקוף, רק container ל-questions ─── */
#lexa-seo-spec .step {
    /* אין background, אין border — השאלה היא הכוכבת */
}

/* ═══════════════════════════════════════════════════════════
   QUESTIONS — שאלה אחת בלבד מוצגת בכל פעם
   ═══════════════════════════════════════════════════════════ */
#lexa-seo-spec .question {
    /* ברירת מחדל: מוסתר. רק השאלה הפעילה גלויה */
    display: none;
}

#lexa-seo-spec .question.q-active {
    display: block;
    animation: lx-questionEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#lexa-seo-spec .question.q-leaving {
    animation: lx-questionLeave 0.2s ease-in forwards;
}

@keyframes lx-questionEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#lexa-seo-spec .question.q-hidden {
    display: none !important;
}

/* ─── Question label — גדול, נקרא קל ─── */
#lexa-seo-spec .question-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 19px;
    font-weight: 700;
    color: var(--lx-text);
    margin-bottom: 8px;
    line-height: 1.4;
    flex-wrap: wrap;
    letter-spacing: -0.3px;
}

#lexa-seo-spec .required-mark {
    color: var(--lx-warning);
    font-weight: 700;
}

#lexa-seo-spec .tooltip-trigger {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--lx-line-soft);
    color: var(--lx-text-muted);
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, color 0.2s;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
    flex-shrink: 0;
    margin-top: 4px;
}

#lexa-seo-spec .tooltip-trigger:hover,
#lexa-seo-spec .tooltip-trigger:focus-visible {
    background: var(--lx-primary);
    color: white;
    outline: none;
}

#lexa-seo-spec .question-help {
    font-size: 14.5px;
    color: var(--lx-text-muted);
    margin-bottom: 18px;
    line-height: 1.55;
}

#lexa-seo-spec .question-input {
    margin-top: 14px;
}

#lexa-seo-spec .question-error {
    font-size: 13px;
    color: var(--lx-warning);
    margin-top: 10px;
    display: none;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    padding: 8px 12px;
    background: var(--lx-warning-soft);
    border-radius: var(--lx-radius-sm);
    animation: lx-shake 0.4s;
}

#lexa-seo-spec .question-error.visible {
    display: flex;
}

#lexa-seo-spec .question-error::before {
    content: '⚠';
    font-size: 14px;
}

@keyframes lx-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ─── Text Inputs ─── */
#lexa-seo-spec .question input[type="text"],
#lexa-seo-spec .question input[type="url"],
#lexa-seo-spec .question input[type="email"],
#lexa-seo-spec .question input[type="tel"],
#lexa-seo-spec .question textarea,
#lexa-seo-spec .question select,
#lexa-seo-spec .lead-field input,
#lexa-seo-spec .lead-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--lx-line);
    border-radius: var(--lx-radius-md);
    font-family: inherit;
    font-size: 16px;  /* 16px+ במובייל — מונע zoom אוטומטי ב-iOS */
    color: var(--lx-text);
    background: var(--lx-paper);
    transition: border-color 0.2s, box-shadow 0.2s;
    line-height: 1.5;
    -webkit-appearance: none;
    appearance: none;
}

#lexa-seo-spec .question input::placeholder,
#lexa-seo-spec .question textarea::placeholder,
#lexa-seo-spec .lead-field input::placeholder,
#lexa-seo-spec .lead-field textarea::placeholder {
    color: var(--lx-text-faint);
}

#lexa-seo-spec .question input:hover,
#lexa-seo-spec .question textarea:hover,
#lexa-seo-spec .question select:hover,
#lexa-seo-spec .lead-field input:hover,
#lexa-seo-spec .lead-field textarea:hover {
    border-color: var(--lx-text-faint);
}

#lexa-seo-spec .question input:focus,
#lexa-seo-spec .question textarea:focus,
#lexa-seo-spec .question select:focus,
#lexa-seo-spec .lead-field input:focus,
#lexa-seo-spec .lead-field textarea:focus {
    outline: none;
    border-color: var(--lx-primary);
    box-shadow: var(--lx-shadow-focus);
}

#lexa-seo-spec .question input.error,
#lexa-seo-spec .question textarea.error,
#lexa-seo-spec .question select.error,
#lexa-seo-spec .lead-field input.error,
#lexa-seo-spec .lead-field textarea.error {
    border-color: var(--lx-warning);
    background: var(--lx-warning-soft);
}

#lexa-seo-spec .question textarea,
#lexa-seo-spec .lead-field textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.65;
}

#lexa-seo-spec .question select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: left 15px center;
    padding-left: 38px;
    cursor: pointer;
}

/* ─── Radio Buttons & Checkboxes — Large tappable cards ─── */
#lexa-seo-spec .radio-group,
#lexa-seo-spec .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#lexa-seo-spec .radio-label,
#lexa-seo-spec .checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--lx-line);
    border-radius: var(--lx-radius-md);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--lx-paper);
    min-height: 56px;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

@media (hover: hover) {
    #lexa-seo-spec .radio-label:hover,
    #lexa-seo-spec .checkbox-label:hover {
        border-color: var(--lx-primary-light);
        background: var(--lx-primary-soft);
    }
}

#lexa-seo-spec .radio-label input[type="radio"],
#lexa-seo-spec .checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--lx-line);
    background: var(--lx-paper);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
    margin: 0;
    position: relative;
}

#lexa-seo-spec .radio-label input[type="radio"] {
    border-radius: 50%;
}

#lexa-seo-spec .checkbox-label input[type="checkbox"] {
    border-radius: 6px;
}

#lexa-seo-spec .radio-label input[type="radio"]:checked,
#lexa-seo-spec .checkbox-label input[type="checkbox"]:checked {
    border-color: var(--lx-primary);
    background: var(--lx-primary);
}

#lexa-seo-spec .radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

#lexa-seo-spec .checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

#lexa-seo-spec .radio-label:has(input:checked),
#lexa-seo-spec .checkbox-label:has(input:checked) {
    border-color: var(--lx-primary);
    background: var(--lx-primary-soft);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.12);
}

#lexa-seo-spec .radio-label:has(input:focus-visible),
#lexa-seo-spec .checkbox-label:has(input:focus-visible) {
    box-shadow: var(--lx-shadow-focus);
}

#lexa-seo-spec .radio-text,
#lexa-seo-spec .checkbox-text {
    font-size: 15px;
    color: var(--lx-text);
    line-height: 1.5;
    flex: 1;
}

#lexa-seo-spec .radio-label:has(input:checked) .radio-text,
#lexa-seo-spec .checkbox-label:has(input:checked) .checkbox-text {
    color: var(--lx-primary-darker);
    font-weight: 600;
}

/* ─── Linked Dropdowns ─── */
#lexa-seo-spec .parent-dropdown,
#lexa-seo-spec .child-dropdown {
    margin-bottom: 10px;
}

#lexa-seo-spec .parent-dropdown:last-child,
#lexa-seo-spec .child-dropdown:last-child {
    margin-bottom: 0;
}

#lexa-seo-spec select:disabled {
    background-color: var(--lx-line-soft);
    color: var(--lx-text-faint);
    cursor: not-allowed;
}

#lexa-seo-spec .custom-industry-input {
    margin-top: 10px;
}

/* ─── List Inputs (URLs / Text) ─── */
#lexa-seo-spec .list-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#lexa-seo-spec .list-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

#lexa-seo-spec .list-item input {
    flex: 1;
}

#lexa-seo-spec .list-remove {
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--lx-line);
    background: var(--lx-paper);
    border-radius: var(--lx-radius-md);
    color: var(--lx-text-muted);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

@media (hover: hover) {
    #lexa-seo-spec .list-remove:hover {
        border-color: var(--lx-warning);
        color: var(--lx-warning);
        background: var(--lx-warning-soft);
    }
}

#lexa-seo-spec .list-add {
    align-self: flex-start;
    background: none;
    border: 1.5px dashed var(--lx-line);
    color: var(--lx-primary);
    padding: 10px 18px;
    border-radius: var(--lx-radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-top: 4px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

#lexa-seo-spec .list-add::before {
    content: '+ ';
    font-weight: 700;
}

@media (hover: hover) {
    #lexa-seo-spec .list-add:hover {
        border-color: var(--lx-primary);
        background: var(--lx-primary-soft);
        border-style: solid;
    }
}

#lexa-seo-spec .list-add:disabled {
    color: var(--lx-text-faint);
    border-color: var(--lx-line);
    cursor: not-allowed;
    background: var(--lx-line-soft);
}

/* ═══════════════════════════════════════════════════════════
   FORM NAV — קבוע למטה
   ═══════════════════════════════════════════════════════════ */
#lexa-seo-spec .form-nav {
    background: var(--lx-paper);
    border-top: 1px solid var(--lx-line);
    padding: 14px 0;
    position: sticky;
    bottom: 0;
    z-index: 50;
    margin-top: auto;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#lexa-seo-spec .form-nav-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 14px;
    display: flex;
    gap: 10px;
    align-items: center;
}

#lexa-seo-spec .btn-nav {
    min-height: 50px;
}

#lexa-seo-spec .btn-nav-prev {
    background: var(--lx-paper);
    color: var(--lx-text-soft);
    border: 1.5px solid var(--lx-line);
    flex: 0 0 auto;
    padding: 12px 16px;
    /* רק כפתור החזרה — קטן יותר */
}

@media (hover: hover) {
    #lexa-seo-spec .btn-nav-prev:hover {
        background: var(--lx-bg);
        border-color: var(--lx-text-faint);
        color: var(--lx-text);
    }
}

#lexa-seo-spec .btn-nav-prev .btn-nav-label {
    /* טקסט "הקודם" — מוסתר במובייל קטן, מוצג בטאבלט+ */
    display: none;
}

#lexa-seo-spec .btn-nav-prev[disabled] {
    visibility: hidden;
    /* שומר על המקום אבל מוסתר — כדי שכפתור ה-next לא יזוז */
}

#lexa-seo-spec .btn-nav-next,
#lexa-seo-spec .btn-nav-submit {
    background: var(--lx-primary);
    color: white;
    box-shadow: var(--lx-shadow-sm);
    flex: 1;
    padding: 14px 22px;
    font-size: 15.5px;
    font-weight: 700;
}

@media (hover: hover) {
    #lexa-seo-spec .btn-nav-next:hover,
    #lexa-seo-spec .btn-nav-submit:hover {
        background: var(--lx-primary-dark);
        box-shadow: var(--lx-shadow-md);
    }
}

#lexa-seo-spec .btn-nav-submit {
    background: var(--lx-accent-dark);
}

@media (hover: hover) {
    #lexa-seo-spec .btn-nav-submit:hover {
        background: #b45309;
    }
}

#lexa-seo-spec .btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

#lexa-seo-spec .form-nav-hint {
    /* רמז קלידן "Enter ↵" - מוצג רק בדסקטופ */
    display: none;
    font-size: 12px;
    color: var(--lx-text-muted);
    flex-shrink: 0;
}

#lexa-seo-spec .form-nav-hint kbd {
    background: var(--lx-line-soft);
    border: 1px solid var(--lx-line);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    font-family: inherit;
    color: var(--lx-text-soft);
    margin-left: 4px;
}

/* ═══════════════════════════════════════════════════════════
   INTERSTITIAL
   ═══════════════════════════════════════════════════════════ */
#lexa-seo-spec .interstitial {
    background: var(--lx-paper);
    border: 1px solid var(--lx-line);
    border-radius: var(--lx-radius-xl);
    padding: 32px 22px;
    text-align: center;
    box-shadow: var(--lx-shadow-sm);
    animation: lx-fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    max-width: 540px;
    margin: 20px auto;
}

#lexa-seo-spec .interstitial::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--lx-primary), var(--lx-primary-light), var(--lx-accent));
}

#lexa-seo-spec .interstitial-icon {
    font-size: 30px;
    background: var(--lx-primary-soft);
    color: var(--lx-primary);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: 700;
}

#lexa-seo-spec .interstitial-text {
    font-size: 17px;
    line-height: 1.6;
    margin: 0 auto 24px;
    max-width: 480px;
    color: var(--lx-text);
    font-weight: 500;
}

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

/* ═══════════════════════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════════════════════ */
#lexa-seo-spec .screen-loading {
    padding: 80px 16px;
    background: var(--lx-bg);
    text-align: center;
}

#lexa-seo-spec .loading-container {
    max-width: 500px;
    margin: 0 auto;
}

#lexa-seo-spec .loading-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--lx-primary-tint);
    border-top-color: var(--lx-primary);
    border-radius: 50%;
    animation: lx-spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

@keyframes lx-spin { to { transform: rotate(360deg); } }

#lexa-seo-spec .loading-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--lx-text);
    margin-bottom: 10px;
}

#lexa-seo-spec .loading-text {
    font-size: 15px;
    color: var(--lx-text-soft);
    line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════════
   LEAD CAPTURE SCREEN
   ═══════════════════════════════════════════════════════════ */
#lexa-seo-spec .screen-lead {
    padding: 32px 16px 56px;
    background: var(--lx-bg);
}

#lexa-seo-spec .lead-container {
    max-width: 660px;
    margin: 0 auto;
}

#lexa-seo-spec .lead-success-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--lx-good-soft);
    color: var(--lx-good);
    padding: 7px 14px;
    border-radius: var(--lx-radius-full);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}

#lexa-seo-spec .lead-check {
    background: var(--lx-good);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

#lexa-seo-spec .lead-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--lx-text);
    line-height: 1.3;
    margin: 0 0 14px;
    letter-spacing: -0.3px;
}

#lexa-seo-spec .lead-subtitle {
    font-size: 15.5px;
    color: var(--lx-text-soft);
    line-height: 1.7;
    margin: 0 0 28px;
}

#lexa-seo-spec .lead-subtitle strong {
    color: var(--lx-primary-darker);
    font-weight: 700;
}

#lexa-seo-spec .lead-form-card {
    background: var(--lx-paper);
    border: 1px solid var(--lx-line);
    border-radius: var(--lx-radius-xl);
    padding: 22px 18px;
    box-shadow: var(--lx-shadow-sm);
}

#lexa-seo-spec .lead-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

#lexa-seo-spec .lead-field {
    display: flex;
    flex-direction: column;
}

#lexa-seo-spec .lead-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--lx-text);
    margin-bottom: 6px;
}

#lexa-seo-spec .lead-error {
    font-size: 12.5px;
    color: var(--lx-warning);
    margin-top: 6px;
    display: none;
    font-weight: 500;
}

#lexa-seo-spec .lead-error.visible {
    display: block;
}

#lexa-seo-spec .lead-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

#lexa-seo-spec .lead-actions .btn {
    width: 100%;
}

#lexa-seo-spec .lead-privacy {
    text-align: center;
    font-size: 12.5px;
    color: var(--lx-text-muted);
    margin: 18px 0 0;
    line-height: 1.5;
}

#lexa-seo-spec .lead-submitted {
    background: var(--lx-good-soft);
    border: 1px solid var(--lx-good);
    border-radius: var(--lx-radius-lg);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    animation: lx-fadeIn 0.4s ease;
}

#lexa-seo-spec .lead-submitted strong {
    color: var(--lx-good);
    display: block;
    font-size: 16px;
    margin-bottom: 6px;
}

#lexa-seo-spec .lead-submitted span {
    color: var(--lx-text-soft);
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════
   RESULT SCREEN
   ═══════════════════════════════════════════════════════════ */
#lexa-seo-spec .screen-result {
    background: var(--lx-bg);
}

#lexa-seo-spec .result-header {
    background: linear-gradient(135deg, var(--lx-primary-darker), var(--lx-primary));
    color: white;
    padding: 20px 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

#lexa-seo-spec .result-header-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#lexa-seo-spec .result-success {
    display: flex;
    align-items: center;
    gap: 12px;
}

#lexa-seo-spec .result-check {
    background: rgba(255,255,255,0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

#lexa-seo-spec .result-title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 2px;
    line-height: 1.3;
}

#lexa-seo-spec .result-subtitle {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.4;
}

#lexa-seo-spec .result-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#lexa-seo-spec .result-actions .btn {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    padding: 11px 14px;
    min-height: 44px;
}

#lexa-seo-spec .result-actions .btn-primary {
    background: white;
    color: var(--lx-primary-darker);
}

@media (hover: hover) {
    #lexa-seo-spec .result-actions .btn-primary:hover {
        background: var(--lx-primary-soft);
    }
}

#lexa-seo-spec .result-actions .btn-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.4);
}

@media (hover: hover) {
    #lexa-seo-spec .result-actions .btn-secondary:hover {
        background: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.7);
    }
}

#lexa-seo-spec .result-iframe-wrap {
    background: var(--lx-paper);
    margin: 0 auto;
    max-width: 1100px;
    padding: 14px;
}

#lexa-seo-spec .result-iframe-wrap iframe {
    width: 100%;
    height: 75vh;
    min-height: 600px;
    border: 1px solid var(--lx-line);
    border-radius: var(--lx-radius-lg);
    background: white;
    box-shadow: var(--lx-shadow-sm);
    display: block;
}

#lexa-seo-spec .result-footer {
    text-align: center;
    padding: 14px 16px 28px;
}

/* ═══════════════════════════════════════════════════════════
   TOOLTIP OVERLAY
   ═══════════════════════════════════════════════════════════ */
#lexa-seo-spec .tooltip-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    animation: lx-fadeIn 0.2s ease;
}

#lexa-seo-spec .tooltip-content {
    background: var(--lx-paper);
    border-radius: var(--lx-radius-lg);
    padding: 26px 22px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: var(--lx-shadow-lg);
    font-size: 15px;
    line-height: 1.7;
    color: var(--lx-text);
    max-height: 80vh;
    overflow-y: auto;
}

#lexa-seo-spec .tooltip-close {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    background: var(--lx-line-soft);
    border: none;
    border-radius: 50%;
    font-size: 22px;
    color: var(--lx-text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

#lexa-seo-spec .tooltip-close:hover {
    background: var(--lx-line);
    color: var(--lx-text);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet up
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 640px) {
    #lexa-seo-spec .screen-landing {
        padding: 56px 24px 72px;
    }

    #lexa-seo-spec .landing-title {
        font-size: 38px;
    }

    #lexa-seo-spec .landing-subtitle {
        font-size: 17.5px;
    }

    #lexa-seo-spec .landing-features {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    #lexa-seo-spec .feature {
        grid-template-columns: 1fr;
        text-align: right;
        padding: 22px 18px;
    }

    /* Header — שלוש עמודות בטאבלט+ */
    #lexa-seo-spec .form-header-content {
        padding: 0 20px;
        grid-template-columns: auto 1fr auto;
        gap: 16px;
    }

    #lexa-seo-spec .save-indicator {
        display: flex;
        justify-content: flex-end;
    }

    #lexa-seo-spec .form-main {
        padding: 32px 24px calc(var(--lx-nav-height) + 32px);
    }

    #lexa-seo-spec .question-label {
        font-size: 22px;
    }

    /* Nav — מוצג טקסט "הקודם" + רמז קלידן */
    #lexa-seo-spec .btn-nav-prev .btn-nav-label {
        display: inline;
    }

    #lexa-seo-spec .form-nav-hint {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    #lexa-seo-spec .interstitial {
        padding: 48px 32px;
    }

    #lexa-seo-spec .interstitial-icon {
        width: 76px;
        height: 76px;
        font-size: 34px;
    }

    #lexa-seo-spec .interstitial-text {
        font-size: 19px;
    }

    #lexa-seo-spec .loading-spinner {
        width: 64px;
        height: 64px;
    }

    #lexa-seo-spec .loading-title {
        font-size: 26px;
    }

    #lexa-seo-spec .lead-title {
        font-size: 28px;
    }

    #lexa-seo-spec .lead-form-card {
        padding: 32px 28px;
    }

    #lexa-seo-spec .lead-form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }

    #lexa-seo-spec .lead-field-full {
        grid-column: 1 / -1;
    }

    #lexa-seo-spec .lead-actions {
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: center;
    }

    #lexa-seo-spec .lead-actions .btn {
        width: auto;
    }

    #lexa-seo-spec .lead-actions .btn-large {
        min-width: 240px;
    }

    #lexa-seo-spec .result-header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    #lexa-seo-spec .result-actions {
        flex-wrap: nowrap;
    }

    #lexa-seo-spec .result-actions .btn {
        flex: 0 0 auto;
    }

    #lexa-seo-spec .result-title {
        font-size: 20px;
    }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Desktop up
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
    #lexa-seo-spec .question-label {
        font-size: 24px;
    }

    #lexa-seo-spec .result-iframe-wrap iframe {
        height: 80vh;
    }
}

/* ═══════════════════════════════════════════════════════════
   ACCESSIBILITY — reduced motion
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    #lexa-seo-spec *,
    #lexa-seo-spec *::before,
    #lexa-seo-spec *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
