/* ============================================================
   FE QUOTES — fe-quotes.css
   Card · Progress bar · Steps · Fields · Nav · Messages · Success
   Logical properties only — shared between RTL (ar/ku) and LTR (en).
   ============================================================ */

/* ── 1. CARD ─────────────────────────────────────────────── */
.fe-quote {
    max-width: 720px;
    margin-inline: auto;
    background: var(--fe-white);
    border-radius: var(--fe-radius-lg);
    box-shadow: var(--fe-shadow);
    padding: var(--fe-space-8);
}

/* ── 2. PROGRESS BAR ─────────────────────────────────────── */
.fe-quote__progress {
    display: flex;
    align-items: flex-start;
    margin-block-end: var(--fe-space-8);
}

.fe-quote__progress-step {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--fe-space-2);
    text-align: center;
}

/* Connector line between dots */
.fe-quote__progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    inset-inline-start: 50%;
    width: 100%;
    height: 2px;
    background: var(--fe-border);
    z-index: 0;
}

.fe-quote__progress-step.is-done:not(:last-child)::after {
    background: var(--fe-primary);
}

.fe-quote__progress-dot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--fe-white);
    border: 2px solid var(--fe-border);
    color: var(--fe-text-muted);
    font-size: var(--fe-text-sm);
    font-weight: var(--fe-weight-bold);
    transition: background var(--fe-transition), border-color var(--fe-transition), color var(--fe-transition);
}

.fe-quote__progress-step.is-active .fe-quote__progress-dot {
    background: var(--fe-accent);
    border-color: var(--fe-accent);
    color: var(--fe-white);
}

.fe-quote__progress-step.is-done .fe-quote__progress-dot {
    background: var(--fe-primary);
    border-color: var(--fe-primary);
    color: var(--fe-white);
}

.fe-quote__progress-label {
    font-size: var(--fe-text-xs);
    color: var(--fe-text-muted);
    font-weight: var(--fe-weight-medium);
    transition: color var(--fe-transition);
}

.fe-quote__progress-step.is-active .fe-quote__progress-label {
    color: var(--fe-text);
    font-weight: var(--fe-weight-semibold);
}

.fe-quote__progress-step.is-done .fe-quote__progress-label {
    color: var(--fe-primary);
}

/* ── 3. STEPS ─────────────────────────────────────────────── */
.fe-quote__step {
    display: none;
}

.fe-quote__step.is-active {
    display: block;
}

/* ── 4. FIELDS ────────────────────────────────────────────── */
.fe-quote__field {
    display: flex;
    flex-direction: column;
    gap: var(--fe-space-2);
    margin-block-end: var(--fe-space-5);
    text-align: start;
}

.fe-quote__field label {
    font-size: var(--fe-text-sm);
    font-weight: var(--fe-weight-semibold);
    color: var(--fe-text);
}

.fe-quote__field input,
.fe-quote__field select,
.fe-quote__field textarea {
    width: 100%;
    padding: 12px var(--fe-space-4);
    font-family: inherit;
    font-size: var(--fe-text-base);
    line-height: 1.5;
    color: var(--fe-text);
    background: var(--fe-white);
    border: 1.5px solid var(--fe-border);
    border-radius: var(--fe-radius);
    appearance: none;
    transition: border-color var(--fe-transition-fast), box-shadow var(--fe-transition-fast);
}

.fe-quote__field textarea {
    min-height: 120px;
    resize: vertical;
}

.fe-quote__field input:focus,
.fe-quote__field select:focus,
.fe-quote__field textarea:focus {
    outline: none;
    border-color: var(--fe-secondary);
    box-shadow: 0 0 0 3px rgba(0, 130, 202, .12);
}

.fe-quote__field input::placeholder,
.fe-quote__field textarea::placeholder {
    color: var(--fe-text-muted);
    opacity: .7;
}

.fe-quote__field input.is-invalid,
.fe-quote__field select.is-invalid,
.fe-quote__field textarea.is-invalid {
    border-color: var(--fe-error);
}

.fe-quote__field input.is-invalid:focus,
.fe-quote__field select.is-invalid:focus,
.fe-quote__field textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

/* ── 5. HONEYPOT (visually hidden, kept in the layout flow) ── */
.fe-quote__hp {
    position: absolute;
    inset-inline-start: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ── 6. NAV / BUTTONS ─────────────────────────────────────── */
.fe-quote__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--fe-space-4);
    flex-wrap: wrap;
    margin-block-start: var(--fe-space-6);
}

/* .fe-quote__btn-next / .fe-quote__btn-submit already carry fe-btn
   fe-btn--accent classes from the theme — nothing to add here beyond
   nav layout above. Only the "previous" button ships without an
   fe-btn class in the markup, so it needs its own look. */
.fe-quote__btn-prev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: var(--fe-text-base);
    font-weight: var(--fe-weight-semibold);
    font-family: inherit;
    color: var(--fe-primary);
    background: transparent;
    border: 2px solid var(--fe-border);
    border-radius: var(--fe-radius);
    cursor: pointer;
    transition: background var(--fe-transition), border-color var(--fe-transition), color var(--fe-transition);
}

.fe-quote__btn-prev:hover {
    background: var(--fe-bg);
    border-color: var(--fe-primary);
}

/* ── 7. FORM MESSAGE ──────────────────────────────────────── */
.fe-quote__msg {
    min-height: 1.3em;
    margin-block-start: var(--fe-space-3);
    font-size: var(--fe-text-sm);
    font-weight: var(--fe-weight-medium);
    text-align: start;
}

.fe-quote__msg.is-error {
    color: var(--fe-error);
}

.fe-quote__msg.is-success {
    color: var(--fe-success);
}

/* ── 8. SUCCESS SCREEN ────────────────────────────────────── */
.fe-quote__success {
    padding-block: var(--fe-space-8);
    text-align: center;
}

.fe-quote__success::before {
    content: '\2713';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-inline: auto;
    margin-block-end: var(--fe-space-5);
    border-radius: 50%;
    background: rgba(22, 163, 74, .12);
    color: var(--fe-success);
    font-size: var(--fe-text-3xl);
    font-weight: var(--fe-weight-bold);
    line-height: 1;
}

.fe-quote__success h3 {
    margin-block-end: var(--fe-space-3);
}

.fe-quote__success p {
    max-width: 480px;
    margin-inline: auto;
    margin-block-end: var(--fe-space-6);
    color: var(--fe-text-muted);
}

.fe-quote__wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--fe-space-2);
    padding: 12px 28px;
    background: #25D366;
    color: var(--fe-white);
    font-weight: var(--fe-weight-semibold);
    border-radius: var(--fe-radius);
    transition: background var(--fe-transition), transform var(--fe-transition), box-shadow var(--fe-transition);
}

.fe-quote__wa-btn:hover {
    background: #1da851;
    color: var(--fe-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, .3);
}

/* ── 9. RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 767px) {
    .fe-quote {
        padding: var(--fe-space-6);
    }
}

@media (max-width: 639px) {
    .fe-quote__nav {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .fe-quote__nav button {
        width: 100%;
    }

    .fe-quote__progress-label {
        font-size: 10px;
    }
}

@media (max-width: 479px) {
    .fe-quote {
        padding: var(--fe-space-5);
        border-radius: var(--fe-radius);
    }

    .fe-quote__progress-dot {
        width: 30px;
        height: 30px;
    }

    .fe-quote__progress-step:not(:last-child)::after {
        top: 15px;
    }
}
