/* ================================================================
   Elementory Inquiry Form  –  form.css  v2
   Single-card, stepper inside, EXIMP-inspired, Dana font, RTL
   ================================================================ */

/* ── Tokens ── */
.eiq-wrap {
  --eiq-navy:        #1B2A4A;
  --eiq-blue:        #3B5BDB;
  --eiq-blue-hover:  #2F4AC9;
  --eiq-blue-light:  #EEF2FF;
  --eiq-done:        #4CAF82;
  --eiq-surface:     #FFFFFF;
  --eiq-bg-input:    #F8F9FC;
  --eiq-border:      #DDE2EC;
  --eiq-border-focus:#3B5BDB;
  --eiq-text:        #1B2A4A;
  --eiq-muted:       #8492A6;
  --eiq-error:       #E53E3E;
  --eiq-radius:      16px;
  --eiq-radius-sm:   10px;
  --eiq-transition:  .35s cubic-bezier(.4,0,.2,1);

  font-family: 'Dana', Tahoma, Arial, sans-serif;
  direction: rtl;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px 48px;
  color: var(--eiq-text);
}

.eiq-hidden { display: none !important; }

/* ================================================================
   Shell — the white card
   ================================================================ */
.eiq-shell {
  background: var(--eiq-surface);
  border-radius: var(--eiq-radius);
  box-shadow: 0 8px 40px rgba(27,42,74,.13), 0 1px 4px rgba(27,42,74,.06);
  padding: 32px 36px 36px;
  overflow: hidden;
}

@media (max-width: 520px) {
  .eiq-shell { padding: 22px 18px 28px; }
}

/* ================================================================
   Stepper — horizontal, nodes + connecting line
   ================================================================ */
.eiq-stepper {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  gap: 0;
  position: relative;
}

/* Each step item takes equal space */
.eiq-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Connecting line between nodes */
.eiq-step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px;
  /* In RTL, line goes from left side of node to right side of next */
  left: calc(-50% + 15px);
  right: calc(50% + 15px);
  height: 2px;
  background: var(--eiq-border);
  z-index: 0;
  transition: background var(--eiq-transition);
}

.eiq-step-item.done:not(:last-child)::after {
  background: var(--eiq-done);
}

.eiq-step-item.active:not(:last-child)::after {
  background: linear-gradient(90deg, var(--eiq-border) 0%, var(--eiq-border) 100%);
}

/* Node circle */
.eiq-step-node {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--eiq-border);
  background: var(--eiq-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--eiq-muted);
  transition: border-color var(--eiq-transition), background var(--eiq-transition), color var(--eiq-transition), transform var(--eiq-transition);
  cursor: default;
  z-index: 2;
  position: relative;
}

.eiq-step-item.done .eiq-step-node {
  background: var(--eiq-done);
  border-color: var(--eiq-done);
  color: #fff;
  cursor: pointer;
}

.eiq-step-item.done .eiq-step-node::after {
  content: '✓';
  font-size: 13px;
}

.eiq-step-item.done .eiq-step-node > span { display: none; }

.eiq-step-item.active .eiq-step-node {
  background: var(--eiq-blue);
  border-color: var(--eiq-blue);
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 0 0 4px var(--eiq-blue-light);
}

/* Step label under node */
.eiq-step-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--eiq-muted);
  white-space: nowrap;
  transition: color var(--eiq-transition);
}

.eiq-step-item.active .eiq-step-name {
  color: var(--eiq-blue);
}

.eiq-step-item.done .eiq-step-name {
  color: var(--eiq-done);
}

/* ================================================================
   Panels
   ================================================================ */
.eiq-panel {
  animation: eiqFadeUp var(--eiq-transition) both;
}

@keyframes eiqFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.eiq-panel-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--eiq-text);
  margin: 0 0 24px;
  letter-spacing: -.01em;
}

/* ================================================================
   Fields
   ================================================================ */
.eiq-row {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
}

.eiq-row-2 > .eiq-field { flex: 1; min-width: 0; }

.eiq-field {
  margin-bottom: 14px;
}

.eiq-field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--eiq-text);
  margin: 0 0 8px;
}

/* Unified input style — inputs, selects, textareas all share this */
.eiq-input {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--eiq-border);
  border-radius: var(--eiq-radius-sm);
  font-family: 'Dana', Tahoma, Arial, sans-serif;
  font-size: 14px;
  color: var(--eiq-text);
  background: var(--eiq-bg-input);
  transition: border-color .2s, box-shadow .2s, background .2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.eiq-input::placeholder {
  color: var(--eiq-muted);
  font-size: 13.5px;
}

.eiq-input:focus {
  border-color: var(--eiq-border-focus);
  background: var(--eiq-surface);
  box-shadow: 0 0 0 3px var(--eiq-blue-light);
}

.eiq-input.eiq-error-field {
  border-color: var(--eiq-error);
  box-shadow: 0 0 0 3px rgba(229,62,62,.10);
}

.eiq-textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.6;
}

/* Select arrow */
.eiq-select-wrap { position: relative; }
.eiq-select-wrap::after {
  content: '▾';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--eiq-muted);
  pointer-events: none;
  font-size: 11px;
}
.eiq-select { cursor: pointer; }

/* ================================================================
   Step 1 — service selection cards
   ================================================================ */
.eiq-service-options {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
}

.eiq-service-card {
  flex: 1;
  border: 2px solid var(--eiq-border);
  border-radius: var(--eiq-radius);
  padding: 22px 14px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--eiq-transition), background var(--eiq-transition),
              box-shadow var(--eiq-transition), transform var(--eiq-transition);
  display: block;
  position: relative;
  background: var(--eiq-surface);
}

.eiq-service-card input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}

.eiq-service-card:hover {
  border-color: var(--eiq-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,91,219,.10);
}

.eiq-service-card.selected {
  border-color: var(--eiq-blue);
  background: var(--eiq-blue-light);
  box-shadow: 0 0 0 3px var(--eiq-blue-light);
  transform: translateY(-3px);
}

.eiq-service-icon { font-size: 34px; margin-bottom: 10px; line-height: 1; }

.eiq-service-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--eiq-text);
  margin-bottom: 5px;
}

.eiq-service-card.selected .eiq-service-label { color: var(--eiq-blue); }

.eiq-service-desc {
  font-size: 12px;
  color: var(--eiq-muted);
  line-height: 1.5;
}

/* ================================================================
   Step 3 — radio pills
   ================================================================ */
.eiq-radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.eiq-radio-pill {
  cursor: pointer;
}

.eiq-radio-pill input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}

.eiq-radio-pill > span {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border: 1.5px solid var(--eiq-border);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  background: var(--eiq-bg-input);
  color: var(--eiq-text);
  transition: border-color .2s, background .2s, color .2s;
}

.eiq-radio-pill input:checked + span {
  border-color: var(--eiq-blue);
  background: var(--eiq-blue-light);
  color: var(--eiq-blue);
  font-weight: 600;
}

/* ================================================================
   Action row
   ================================================================ */
.eiq-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--eiq-border);
}

.eiq-actions-end {
  justify-content: flex-end;
  border-top: none;
  padding-top: 4px;
  margin-top: 0;
}

/* Shared button base */
.eiq-btn-next,
.eiq-btn-back,
.eiq-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 28px;
  border-radius: 8px;
  border: none;
  font-family: 'Dana', Tahoma, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--eiq-transition), transform .15s, box-shadow .2s, border-color .2s;
}

/* Primary — Next & Submit */
.eiq-btn-next,
.eiq-btn-submit {
  background: var(--eiq-blue);
  color: #fff;
  flex: 1;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(59,91,219,.28);
}

.eiq-btn-next:hover,
.eiq-btn-submit:hover {
  background: var(--eiq-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(59,91,219,.34);
}

.eiq-btn-next:active,
.eiq-btn-submit:active { transform: translateY(0); }

/* Secondary — Back */
.eiq-btn-back {
  background: var(--eiq-surface);
  color: var(--eiq-muted);
  border: 1.5px solid var(--eiq-border);
  padding: 10px 18px;
  flex-shrink: 0;
}

.eiq-btn-back:hover {
  border-color: var(--eiq-blue);
  color: var(--eiq-blue);
  background: var(--eiq-blue-light);
}

/* Spinner */
.eiq-btn-spinner svg {
  animation: eiqSpin .7s linear infinite;
}

@keyframes eiqSpin { to { transform: rotate(360deg); } }

/* ================================================================
   Success screen
   ================================================================ */
.eiq-success-inner {
  text-align: center;
  padding: 48px 0 24px;
}

.eiq-success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--eiq-done);
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 6px 20px rgba(76,175,130,.30);
  animation: eiqPop .5s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes eiqPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.eiq-success-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--eiq-text);
  margin: 0 0 10px;
}

.eiq-success-desc {
  font-size: 14px;
  color: var(--eiq-muted);
  margin: 0;
  line-height: 1.7;
}

/* ================================================================
   Toast
   ================================================================ */
.eiq-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 11px 24px;
  border-radius: 99px;
  font-family: 'Dana', Tahoma, Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  z-index: 99999;
  direction: rtl;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  opacity: 0;
  transition: opacity .25s, transform .25s;
}

.eiq-toast-error   { background: var(--eiq-error); color: #fff; }
.eiq-toast-success { background: var(--eiq-done);  color: #fff; }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 500px) {
  .eiq-row-2 { flex-direction: column; gap: 0; }
  .eiq-service-options { flex-direction: column; }
  .eiq-step-name { font-size: 10px; }
  .eiq-panel-title { font-size: 17px; }
  .eiq-btn-back { padding: 10px 14px; font-size: 13px; }
}
