/* =============================================================================
   form-wizard.css — Prime Imports · Multi-Step Quote Form
   RTL (Hebrew) + LTR (English) | Mobile-first
   v1.0 — April 2026
   =========================================================================== */

/* ── Progress wrapper ────────────────────────────────────────────── */
.wizard-progress-wrapper {
    margin-bottom: 0.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e4e8ec;
}
.wizard-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #666;
}
.wizard-pct {
    font-weight: 700;
    color: #1e88e5;
    font-size: 1.05rem;
    min-width: 3rem;
    text-align: center;
}

/* ── Progress track ──────────────────────────────────────────────── */
.wizard-track {
    height: 8px;
    background: #ebeef2;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.wizard-fill {
    height: 100%;
    background: linear-gradient(90deg, #1565c0, #1e88e5, #42a5f5);
    border-radius: 100px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    width: 0%;
}

/* ── Step dots row ───────────────────────────────────────────────── */
.wizard-dots-row {
    display: flex;
    align-items: flex-start;
    position: relative;
}
[dir="ltr"] .wizard-dots-row { flex-direction: row; }
[dir="rtl"] .wizard-dots-row { flex-direction: row; }

.wizard-dot-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}
/* Connector lines */
.wizard-dot-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    width: 100%;
    height: 2px;
    background: #dde0e4;
    z-index: 0;
    transition: background 0.4s ease;
}
[dir="rtl"] .wizard-dot-item:not(:last-child)::after { right: 50%; left: auto; }
[dir="ltr"] .wizard-dot-item:not(:last-child)::after { left: 50%; right: auto; }
.wizard-dot-item.completed::after { background: #43a047; }

/* Dot circle */
.wizard-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #dde0e4;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    border: 2px solid transparent;
    transition: all 0.32s ease;
    position: relative;
    z-index: 2;
}
.wizard-dot-item.active .wizard-dot {
    background: #1e88e5;
    color: #fff;
    border-color: #1e88e5;
    box-shadow: 0 0 0 5px rgba(30,136,229,0.16);
}
.wizard-dot-item.completed .wizard-dot {
    background: #43a047;
    color: #fff;
    border-color: #43a047;
}
.wizard-dot-label {
    font-size: 0.72rem;
    color: #aaa;
    margin-top: 7px;
    text-align: center;
    line-height: 1.25;
    transition: color 0.3s;
    padding: 0 4px;
}
.wizard-dot-item.active .wizard-dot-label   { color: #1e88e5; font-weight: 600; }
.wizard-dot-item.completed .wizard-dot-label{ color: #43a047; }

/* ── Wizard panels ───────────────────────────────────────────────── */
.wizard-panel { display: none; }
.wizard-panel.active {
    display: block;
    animation: wizardFadeUp 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes wizardFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Navigation buttons ──────────────────────────────────────────── */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.75rem;
    gap: 1rem;
}
.wizard-nav-first { justify-content: flex-end; }
[dir="rtl"] .wizard-nav-first { justify-content: flex-start; }

.btn-wizard-next {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.72rem 1.6rem;
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.01em;
}
.btn-wizard-next:hover {
    background: linear-gradient(135deg, #1976d2, #0d47a1);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(30,136,229,0.32);
}
.btn-wizard-next:active { transform: translateY(0); box-shadow: none; }

.btn-wizard-prev {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.72rem 1.25rem;
    background: #fff;
    color: #555;
    border: 1.5px solid #d4d7db;
    border-radius: 9px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-wizard-prev:hover { background: #f6f7f9; border-color: #aab0b8; color: #333; }

/* ── Summary box ─────────────────────────────────────────────────── */
.wizard-summary {
    background: linear-gradient(135deg, #f0f7ff, #e8f4fd);
    border: 1px solid #c8dff5;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.wizard-summary-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1565c0;
    margin-bottom: 0.75rem;
}
.wizard-summary-items { display: flex; flex-direction: column; gap: 0.4rem; }
.wizard-summary-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.875rem;
}
.wizard-summary-key { color: #5a6a7e; flex-shrink: 0; min-width: 110px; }
.wizard-summary-val { color: #1a2533; font-weight: 600; word-break: break-word; }

/* ── Coupon toggle ───────────────────────────────────────────────── */
.coupon-toggle-wrapper { margin: 1.25rem 0; }
.coupon-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    border: 1.5px dashed #1e88e5;
    color: #1e88e5;
    border-radius: 8px;
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-style 0.2s;
}
.coupon-toggle-btn:hover,
.coupon-toggle-btn.active { background: rgba(30,136,229,0.08); border-style: solid; }
.coupon-field { margin-top: 0.75rem; animation: wizardFadeUp 0.25s ease; }

/* ── Inline validation ───────────────────────────────────────────── */
#contactForm input.field-valid,
#contactForm textarea.field-valid {
    border-color: #43a047 !important;
    box-shadow: 0 0 0 3px rgba(67,160,71,0.10) !important;
}
#contactForm input.field-invalid,
#contactForm textarea.field-invalid {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 3px rgba(211,47,47,0.12) !important;
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .wizard-dot-label   { font-size: 0.65rem; }
    .wizard-pct         { font-size: 0.95rem; }
    .btn-wizard-next    { padding: 0.65rem 1.1rem; font-size: 0.9rem; }
    .btn-wizard-prev    { padding: 0.65rem 0.9rem; font-size: 0.875rem; }
    .wizard-summary     { padding: 0.875rem 1rem; }
    .wizard-summary-key { min-width: 90px; }
    .wizard-meta-row    { font-size: 0.78rem; }
}

/* ── LTR / English overrides ─────────────────────────────────────── */
.lang-en .wizard-nav,
.lang-en .wizard-meta-row,
.lang-en .wizard-summary-item,
.lang-en .wizard-summary-title,
.lang-en .btn-wizard-next,
.lang-en .btn-wizard-prev { direction: ltr; }
.lang-en .wizard-nav-first { justify-content: flex-end !important; }

/* ── Coupon field (inside wizard toggle) ──────────────────────────── */
.coupon-field .coupon-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    gap: 0;
}
.coupon-field .coupon-input-wrapper input[type="text"] {
    width: 100%;
    /* LTR default: icon is on the LEFT → padding-left makes room */
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
/* RTL override: icon moves to RIGHT → swap padding sides */
[dir="rtl"] .coupon-field .coupon-input-wrapper input[type="text"] {
    padding: 0.75rem 2.75rem 0.75rem 1rem;
}
.coupon-field .coupon-input-wrapper input[type="text"]:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30,136,229,0.15);
}
.coupon-field .coupon-icon {
    position: absolute;
    /* LTR default: icon on the LEFT */
    left: 0.85rem;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
    font-size: 0.95rem;
}
/* RTL override: icon on the RIGHT */
[dir="rtl"] .coupon-field .coupon-icon {
    left: auto;
    right: 0.85rem;
}
.coupon-field .coupon-message {
    margin-top: 0.4rem;
    font-size: 0.875rem;
    min-height: 1.2em;
}

/* ── Fieldset legend in wizard (non-accordion, always visible) ─────── */
.wizard-panel .modern-fieldset {
    border: 1px solid #dde0e4;
    border-radius: 10px;
    padding: 1.1rem 1.25rem 1rem;
    margin-bottom: 1.25rem;
}
.wizard-panel .modern-fieldset > legend {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    padding: 0 0.35rem;
    float: none;
    width: auto;
}

/* ── Success / error message (outside panels) ────────────────────────── */
#formMessage {
    margin-top: 1rem;
    border-radius: 10px;
    padding: 0;
    display: none;
}
#formMessage.success-message,
#formMessage.error-message {
    display: block;
    padding: 0.9rem 1.2rem;
}

/* ════════════════════════════════════════════════════════════════════════
   Wizard Two-Column Layout — Fields + Full-Height Image Card
   ════════════════════════════════════════════════════════════════════════ */

.wizard-layout {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;   /* aside stretches to full height of fields */
}
[dir="rtl"] .wizard-layout { flex-direction: row; }
[dir="ltr"] .wizard-layout { flex-direction: row-reverse; }

.wizard-fields {
    flex: 1;
    min-width: 0;
}

/* ── Full-height image card ──────────────────────────────────────────── */
.wizard-aside {
    width: 165px;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    background-color: #e8edf3;          /* fallback before image loads */
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    border: 1px solid rgba(0,0,0,0.09);
    box-shadow:
        0 8px 24px rgba(0,0,0,0.11),
        0 2px 6px rgba(0,0,0,0.06);
    align-self: stretch;
    position: relative;
    min-height: 300px;
    transition: background-position 0.45s ease;
}
.wizard-aside:hover {
    background-position: center 15%;
}

/* Step number badge */
/* Step number badge */
.aside-step-num {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.22);
    z-index: 2;
}


/* ── Meta-row with embedded clear button ─────────────────────────────── */
.wizard-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #666;
    gap: 0.5rem;
}
.meta-left {
    flex: 1;
    font-size: 0.875rem;
    color: #666;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.meta-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ── Clear button (compact icon in meta-row) ─────────────────────────── */
.btn-clear-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.3rem 0.7rem 0.3rem 0.6rem;
    border-radius: 100px;
    background: transparent;
    border: 1px solid #d4d8dd;
    color: #8a9099;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.01em;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.btn-clear-meta i { font-size: 0.62rem; opacity: 0.75; }
.btn-clear-meta:hover {
    color: #d32f2f;
    border-color: #f4a9a7;
    background: rgba(211,47,47,0.05);
}
.btn-clear-meta:hover i { opacity: 1; }

/* ── Mobile: hide aside ──────────────────────────────────────────────── */
@media (max-width: 620px) {
    .wizard-layout { flex-direction: column !important; }
    .wizard-aside  { display: none; }
    .wizard-fields { width: 100%; }
}

/* ── Step 1 aside: wider + taller for maximum visual impact ──────────── */
.wizard-aside-1 {
    width: 195px;           /* wider than default 134px */
    min-height: 580px;      /* tall enough to fill form height */
}


/* ── Zero top margin on first field to avoid blank gap ───────────────── */
.wizard-fields > .form-group:first-child,
.wizard-fields > .wizard-summary:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
