/*
 * Lingova Placement Test — Base Stylesheet
 * Only structural/layout rules. All colors & typography are
 * overridden by Elementor style controls so designers can customise freely.
 */

/* ── Wrapper ─────────────────────────────────────────────────────────────────── */
.lpt-wrap {
    font-family: 'Vazirmatn', 'Segoe UI', system-ui, sans-serif;
    direction: rtl;
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
}

/* ── Card ────────────────────────────────────────────────────────────────────── */
.lpt-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 40px 36px;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
    animation: lptViewIn .4s ease;
}

@keyframes lptViewIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

/* ── Intro Screen ────────────────────────────────────────────────────────────── */
.lpt-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 14px;
    margin-bottom: 18px;
}

.lpt-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 12px;
    color: #0f172a;
}

.lpt-desc {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.8;
    margin: 0 0 28px;
}

/* Features grid */
.lpt-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}
.lpt-feat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 12px;
}
.lpt-feat-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}
.lpt-feat-title {
    font-size: .85rem;
    font-weight: 700;
    color: #1e293b;
}
.lpt-feat-sub {
    font-size: .75rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.lpt-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(120deg, #2563eb, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 99px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, box-shadow .2s;
    text-decoration: none;
    font-family: inherit;
}
.lpt-btn-primary:hover {
    opacity: .9;
    box-shadow: 0 6px 20px rgba(37,99,235,.35);
}

.lpt-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: #475569;
    border: 1.5px solid #cbd5e1;
    border-radius: 99px;
    padding: 12px 28px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    font-family: inherit;
}
.lpt-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.lpt-btn-next {
    width: 100%;
    border-radius: 14px;
    margin-top: 20px;
    padding: 16px;
}

/* ── Quiz Screen ─────────────────────────────────────────────────────────────── */

/* Step dots */
.lpt-dots-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
}
.lpt-dot {
    height: 8px;
    width: 28px;
    border-radius: 99px;
    background: #e2e8f0;
    transition: all .3s;
}
.lpt-dot-done   { background: #22c55e; }
.lpt-dot-active { background: linear-gradient(90deg,#2563eb,#7c3aed); width: 36px; }

/* Meta row */
.lpt-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.lpt-step-label {
    font-size: .85rem;
    font-weight: 700;
    color: #475569;
}
.lpt-topic-badge {
    font-size: .75rem;
    font-weight: 700;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 99px;
    padding: 4px 12px;
    direction: ltr;
}

/* Progress bar */
.lpt-progress-track {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 28px;
}
.lpt-progress-fill {
    height: 100%;
    border-radius: 99px;
    transition: width .5s ease;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
}

/* Question */
.lpt-question-wrap {
    margin-bottom: 20px;
}
.lpt-question-sub {
    font-size: .75rem;
    color: #94a3b8;
    margin-bottom: 8px;
    direction: ltr;
    text-align: left;
}
.lpt-question-text {
    font-size: 1.35rem;
    font-weight: 700;
    direction: ltr;
    text-align: left;
    line-height: 1.55;
    margin: 0;
    color: #0f172a;
    font-family: 'Poppins', 'Vazirmatn', sans-serif;
}

/* Options */
.lpt-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.lpt-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    text-align: left;
    direction: ltr;
    transition: border-color .2s, background .2s, box-shadow .2s;
    font-family: 'Poppins', 'Vazirmatn', sans-serif;
    font-size: 1rem;
    color: #1e293b;
}
.lpt-option:not(:disabled):hover {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 2px 8px rgba(37,99,235,.1);
}
.lpt-option:disabled { cursor: default; }

.lpt-option.lpt-correct {
    border-color: #22c55e;
    background: #f0fdf4;
}
.lpt-option.lpt-wrong {
    border-color: #ef4444;
    background: #fef2f2;
}
.lpt-option.lpt-dimmed {
    opacity: .5;
}

.lpt-opt-letter {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}
.lpt-option:not(:disabled):hover .lpt-opt-letter {
    background: #2563eb;
    color: #fff;
}
.lpt-option.lpt-correct .lpt-opt-letter { background: #22c55e; color: #fff; }
.lpt-option.lpt-wrong   .lpt-opt-letter { background: #ef4444; color: #fff; }

.lpt-opt-text  { flex: 1; }
.lpt-opt-icon  { flex-shrink: 0; display: flex; align-items: center; }
.lpt-icon-correct { color: #16a34a; }
.lpt-icon-wrong   { color: #dc2626; }

/* Hint */
.lpt-hint {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: .9rem;
    line-height: 1.8;
}
.lpt-hint-correct { background: #f0fdf4; color: #166534; }
.lpt-hint-wrong   { background: #fffbeb; color: #92400e; }

.lpt-choose-hint {
    text-align: center;
    font-size: .8rem;
    color: #94a3b8;
    margin-top: 12px;
}

/* ── Result Screen ───────────────────────────────────────────────────────────── */
.lpt-result-screen { text-align: center; }

.lpt-ring-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 20px;
}
.lpt-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.lpt-ring-pct {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(120deg,#2563eb,#7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lpt-level-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 18px 24px;
    margin: 20px 0;
    text-align: center;
}
.lpt-level-label {
    font-size: .8rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 6px;
}
.lpt-level-value {
    font-size: 1.35rem;
    font-weight: 900;
    color: #1e40af;
    direction: ltr;
    font-family: 'Poppins', 'Vazirmatn', sans-serif;
}

.lpt-suggested-label {
    font-size: .85rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 10px;
    text-align: right;
}
.lpt-suggested-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    text-align: right;
}
.lpt-sug-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}
.lpt-sug-meta {
    font-size: .78rem;
    color: #94a3b8;
    direction: ltr;
}
.lpt-suggested-card .lpt-btn-primary {
    border-radius: 10px;
    padding: 10px 20px;
    font-size: .9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.lpt-result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 540px) {
    .lpt-card       { padding: 28px 20px; }
    .lpt-features   { grid-template-columns: 1fr; }
    .lpt-title      { font-size: 1.4rem; }
    .lpt-question-text { font-size: 1.1rem; }
    .lpt-suggested-card { flex-direction: column; align-items: flex-start; }
    .lpt-suggested-card .lpt-btn-primary { width: 100%; }
}

/* ══════════════════════════════════════════════════════════
   در-لحظه: hint و دکمه بعد با انیمیشن ظاهر می‌شن
══════════════════════════════════════════════════════════ */
.lpt-hint {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    transition: max-height .4s cubic-bezier(.22,1,.36,1),
                opacity    .35s ease,
                margin-top .35s ease,
                padding    .35s ease;
}
.lpt-hint-hidden { max-height: 0 !important; }
.lpt-hint-show {
    max-height: 200px;
    opacity: 1;
    margin-top: 18px;
    padding: 14px 18px;
}

.lpt-btn-hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .3s ease .15s, transform .3s ease .15s;
}
.lpt-btn-show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* گزینه‌ها — transition رنگ در-لحظه */
.lpt-option {
    transition: border-color .25s ease, background-color .25s ease,
                box-shadow .25s ease, opacity .25s ease;
}
.lpt-opt-letter {
    transition: background .25s ease, color .25s ease;
}
.lpt-opt-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 1.1em;
    transition: opacity .2s ease;
}
.lpt-icon-correct { color: #16a34a; }
.lpt-icon-wrong   { color: #dc2626; }


/* ══════════════════════════════════════════════════════════
   GLOW EFFECT — همون blur-3xl کد اصلی
══════════════════════════════════════════════════════════ */
.lpt-card { position: relative; overflow: hidden; }

.lpt-card::before,
.lpt-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
    transition: opacity .5s ease;
}

/* glow آبی — بالا راست */
.lpt-card::before {
    width: 220px;
    height: 220px;
    background: rgba(37, 99, 235, 0.18);
    top: -60px;
    right: -40px;
}

/* glow بنفش — پایین چپ */
.lpt-card::after {
    width: 200px;
    height: 200px;
    background: rgba(124, 58, 237, 0.15);
    bottom: -50px;
    left: -30px;
}

/* همه محتوای کارت باید روی glow باشه */
.lpt-card > * { position: relative; z-index: 1; }

/* گلو دکمه اصلی — همون hover:shadow-blue-500/30 */
.lpt-btn-primary {
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
    transition: opacity .2s, box-shadow .25s ease, transform .2s ease;
}
.lpt-btn-primary:hover {
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

/* گلو گزینه درست */
.lpt-option.lpt-correct {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2), 0 4px 14px rgba(34, 197, 94, 0.15);
}
/* گلو گزینه غلط */
.lpt-option.lpt-wrong {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2), 0 4px 14px rgba(239, 68, 68, 0.12);
}

/* ══════════════════════════════════════════════════════════
   DARK MODE
══════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
    .lpt-card {
        background: #0f172a;
        border-color: #1e293b;
        box-shadow: 0 4px 32px rgba(0,0,0,.4);
    }
    .lpt-card::before { background: rgba(37, 99, 235, 0.12); }
    .lpt-card::after  { background: rgba(124, 58, 237, 0.10); }

    .lpt-title       { color: #f1f5f9; }
    .lpt-desc        { color: #94a3b8; }
    .lpt-step-label  { color: #64748b; }
    .lpt-question-sub { color: #475569; }
    .lpt-question-text { color: #e2e8f0; }
    .lpt-choose-hint { color: #475569; }

    /* badge */
    .lpt-badge {
        background: rgba(37, 99, 235, 0.15);
        border-color: #1e3a8a;
        color: #93c5fd;
    }
    .lpt-topic-badge {
        background: rgba(37, 99, 235, 0.12);
        color: #93c5fd;
    }

    /* dots */
    .lpt-dot        { background: #1e293b; }
    .lpt-dot-done   { background: #16a34a; }

    /* progress track */
    .lpt-progress-track { background: #1e293b; }

    /* feat items */
    .lpt-feat-item  { background: #0f172a; border-color: #1e293b; }
    .lpt-feat-title { color: #e2e8f0; }
    .lpt-feat-sub   { color: #475569; }

    /* options */
    .lpt-option {
        background: #0f172a;
        border-color: #1e293b;
        color: #e2e8f0;
    }
    .lpt-option:not(:disabled):hover {
        border-color: #2563eb;
        background: rgba(37, 99, 235, 0.1);
    }
    .lpt-opt-letter { background: #1e293b; color: #64748b; }
    .lpt-option:not(:disabled):hover .lpt-opt-letter { background: #2563eb; color: #fff; }

    .lpt-option.lpt-correct {
        background: rgba(22, 163, 74, 0.12);
        border-color: #16a34a;
    }
    .lpt-option.lpt-correct .lpt-opt-letter { background: #16a34a; color: #fff; }
    .lpt-option.lpt-wrong {
        background: rgba(220, 38, 38, 0.12);
        border-color: #dc2626;
    }
    .lpt-option.lpt-wrong .lpt-opt-letter { background: #dc2626; color: #fff; }
    .lpt-option.lpt-dimmed { opacity: .35; }

    /* hint */
    .lpt-hint-correct { background: rgba(22,163,74,.1);  color: #86efac; }
    .lpt-hint-wrong   { background: rgba(234,179,8,.08); color: #fde68a; }

    /* progress ring track */
    .lpt-ring-svg circle:first-child { stroke: #1e293b; }

    /* level box */
    .lpt-level-box { background: rgba(37,99,235,.1); border-color: #1e3a8a; }
    .lpt-level-label { color: #93c5fd; }
    .lpt-level-value { color: #bfdbfe; }

    /* suggested card */
    .lpt-suggested-label { color: #475569; }
    .lpt-suggested-card  { background: #0f172a; border-color: #1e293b; }
    .lpt-sug-title { color: #e2e8f0; }
    .lpt-sug-meta  { color: #475569; }

    /* secondary btn */
    .lpt-btn-secondary {
        color: #94a3b8;
        border-color: #1e293b;
    }
    .lpt-btn-secondary:hover {
        background: #1e293b;
        border-color: #334155;
    }
}

/* دارک مود دستی (کلاس .dark روی html) — برای تم‌سوئیچر سایت */
.dark .lpt-card {
    background: #0f172a;
    border-color: #1e293b;
    box-shadow: 0 4px 32px rgba(0,0,0,.4);
}
.dark .lpt-card::before { background: rgba(37, 99, 235, 0.12); }
.dark .lpt-card::after  { background: rgba(124, 58, 237, 0.10); }
.dark .lpt-title        { color: #f1f5f9; }
.dark .lpt-desc         { color: #94a3b8; }
.dark .lpt-step-label   { color: #64748b; }
.dark .lpt-question-sub  { color: #475569; }
.dark .lpt-question-text { color: #e2e8f0; }
.dark .lpt-choose-hint   { color: #475569; }
.dark .lpt-badge         { background: rgba(37,99,235,.15); border-color: #1e3a8a; color: #93c5fd; }
.dark .lpt-topic-badge   { background: rgba(37,99,235,.12); color: #93c5fd; }
.dark .lpt-dot           { background: #1e293b; }
.dark .lpt-dot-done      { background: #16a34a; }
.dark .lpt-progress-track { background: #1e293b; }
.dark .lpt-feat-item     { background: #0f172a; border-color: #1e293b; }
.dark .lpt-feat-title    { color: #e2e8f0; }
.dark .lpt-feat-sub      { color: #475569; }
.dark .lpt-option        { background: #0f172a; border-color: #1e293b; color: #e2e8f0; }
.dark .lpt-option:not(:disabled):hover { border-color: #2563eb; background: rgba(37,99,235,.1); }
.dark .lpt-opt-letter    { background: #1e293b; color: #64748b; }
.dark .lpt-option:not(:disabled):hover .lpt-opt-letter { background: #2563eb; color: #fff; }
.dark .lpt-option.lpt-correct { background: rgba(22,163,74,.12); border-color: #16a34a; }
.dark .lpt-option.lpt-correct .lpt-opt-letter { background: #16a34a; color: #fff; }
.dark .lpt-option.lpt-wrong   { background: rgba(220,38,38,.12); border-color: #dc2626; }
.dark .lpt-option.lpt-wrong .lpt-opt-letter   { background: #dc2626; color: #fff; }
.dark .lpt-option.lpt-dimmed  { opacity: .35; }
.dark .lpt-hint-correct { background: rgba(22,163,74,.1);  color: #86efac; }
.dark .lpt-hint-wrong   { background: rgba(234,179,8,.08); color: #fde68a; }
.dark .lpt-ring-svg circle:first-child { stroke: #1e293b; }
.dark .lpt-level-box    { background: rgba(37,99,235,.1); border-color: #1e3a8a; }
.dark .lpt-level-label  { color: #93c5fd; }
.dark .lpt-level-value  { color: #bfdbfe; }
.dark .lpt-suggested-label { color: #475569; }
.dark .lpt-suggested-card  { background: #0f172a; border-color: #1e293b; }
.dark .lpt-sug-title    { color: #e2e8f0; }
.dark .lpt-sug-meta     { color: #475569; }
.dark .lpt-btn-secondary { color: #94a3b8; border-color: #1e293b; }
.dark .lpt-btn-secondary:hover { background: #1e293b; border-color: #334155; }
