/* =====================================================================
   Hello Custom Boxes — Quote Forms Stylesheet (Wizard / No Scroll)
   Path: /wp-content/themes/astra-child/assets/css/hcb-forms.css
   Shared by all 4 quote shortcodes.
   ===================================================================== */

.hcb-quote-card {
  --hcb-primary:    #005e9e;
  --hcb-secondary:  #0078c1;
  --hcb-light:      #f5f9fc;
  --hcb-blue-soft:  #eaf6ff;
  --hcb-border:     #e7e7e7;
  --hcb-error:      #d92121;
  --hcb-success:    #16a34a;
  --hcb-shadow:     0 18px 45px rgba(0, 94, 158, 0.12);

  font-family: "Jost", "Poppins", Arial, sans-serif;
  background: #fff;
  border: 1px solid var(--hcb-border);
  border-radius: 24px;
  box-shadow: var(--hcb-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hcb-quote-card *,
.hcb-quote-card *::before,
.hcb-quote-card *::after { box-sizing: border-box; }

/* ---------- Header ---------- */
.hcb-quote-head {
  padding: 22px 24px 18px;
  background: linear-gradient(135deg, var(--hcb-primary), var(--hcb-secondary));
  color: #fff;
  text-align: left;
}
.hcb-quote-kicker {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 11px;
  letter-spacing: .08em;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.4;
  margin-bottom: 8px;
}
.hcb-quote-title {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.18;
}
.hcb-quote-subtitle {
  margin: 6px 0 0;
  color: rgba(255,255,255,.92);
  font-size: 13px;
  line-height: 1.55;
}

/* ---------- Image strip (gallery sync) ---------- */
.hcb-quote-image-strip {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255,255,255,.14);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.4) transparent;
}
.hcb-quote-image-strip::-webkit-scrollbar { height: 6px; }
.hcb-quote-image-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.4); border-radius: 999px; }

.hcb-quote-image-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.hcb-quote-image-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hcb-quote-image-thumb:hover { transform: translateY(-1px); }
.hcb-quote-image-thumb.is-active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255,255,255,.35);
}

/* ---------- Progress + step dots ---------- */
.hcb-quote-progress {
  padding: 14px 24px 6px;
  background: var(--hcb-light);
  border-bottom: 1px solid var(--hcb-border);
}
.hcb-quote-progress-bar {
  position: relative;
  height: 5px;
  width: 100%;
  border-radius: 999px;
  background: rgba(0, 94, 158, .14);
  overflow: hidden;
}
.hcb-quote-progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--hcb-primary), var(--hcb-secondary));
  border-radius: 999px;
  transition: width .35s ease;
}
.hcb-quote-step-dots {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  gap: 6px;
}
.hcb-quote-step-dot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  font-size: 12px;
  color: #999;
  font-weight: 700;
  transition: color .25s ease;
}
.hcb-quote-step-num {
  display: inline-flex;
  width: 26px; height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  border: 2px solid rgba(0, 94, 158, .2);
  color: #999;
  font-size: 12px;
  font-weight: 900;
  transition: all .25s ease;
  flex-shrink: 0;
}
.hcb-quote-step-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hcb-quote-step-dot.is-active        { color: var(--hcb-primary); }
.hcb-quote-step-dot.is-active .hcb-quote-step-num {
  background: var(--hcb-primary);
  border-color: var(--hcb-primary);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(0, 94, 158, .12);
}
.hcb-quote-step-dot.is-done .hcb-quote-step-num {
  background: var(--hcb-success);
  border-color: var(--hcb-success);
  color: #fff;
}
.hcb-quote-step-dot.is-done .hcb-quote-step-num::before {
  content: "✓";
  font-size: 14px;
}
.hcb-quote-step-dot.is-done .hcb-quote-step-num span { display: none; }

/* ---------- Form body — NO internal scroll ---------- */
.hcb-quote-form {
  display: flex;
  flex-direction: column;
  padding: 22px 24px 6px;
}

.hcb-quote-step {
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: hcbStepIn .35s ease;
}
.hcb-quote-step.is-active { display: flex; }
@keyframes hcbStepIn {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.hcb-quote-step-title {
  margin: 0;
  color: var(--hcb-primary);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
}

/* ---------- Grid + fields ---------- */
.hcb-quote-grid { display: grid; gap: 12px; }
.hcb-quote-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hcb-quote-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.hcb-quote-field { display: grid; gap: 5px; min-width: 0; }
.hcb-quote-field-full { grid-column: 1 / -1; }

.hcb-quote-field label,
.hcb-quote-group-label {
  font-size: 13px;
  font-weight: 750;
  color: #1a1a1a;
}
.hcb-required { color: var(--hcb-error); font-weight: 900; }

.hcb-quote-form input[type="text"],
.hcb-quote-form input[type="email"],
.hcb-quote-form input[type="tel"],
.hcb-quote-form input[type="number"],
.hcb-quote-form select,
.hcb-quote-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid rgba(0,120,193,.30);
  border-radius: 12px;
  background: var(--hcb-blue-soft);
  color: var(--hcb-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.hcb-quote-form 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'><path fill='%23005e9e' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}
.hcb-quote-form textarea { min-height: 76px; resize: vertical; }
.hcb-quote-form input::placeholder,
.hcb-quote-form textarea::placeholder {
  color: rgba(0, 94, 158, .55);
  font-weight: 500;
}
.hcb-quote-form input:focus,
.hcb-quote-form select:focus,
.hcb-quote-form textarea:focus {
  border-color: var(--hcb-secondary);
  box-shadow: 0 0 0 3px rgba(0,120,193,.16);
  background: #fff;
}
.hcb-quote-form .is-invalid {
  border-color: var(--hcb-error);
  box-shadow: 0 0 0 3px rgba(217,33,33,.14);
}

.hcb-quote-hint { color: #666; font-size: 11px; }

/* ---------- Dimensions row ---------- */
.hcb-quote-dimensions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

/* ---------- Checkbox / radio groups ---------- */
.hcb-quote-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  padding: 10px 12px;
  border: 1px dashed rgba(0,120,193,.30);
  border-radius: 12px;
  background: rgba(234, 246, 255, .55);
}
.hcb-quote-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.hcb-quote-check input[type="checkbox"],
.hcb-quote-check input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: var(--hcb-primary);
  cursor: pointer;
}

/* ---------- File input ---------- */
.hcb-quote-file-row {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.hcb-quote-file-btn {
  display: inline-flex; min-height: 42px;
  align-items: center; justify-content: center;
  padding: 8px 18px;
  border: 1px solid var(--hcb-secondary);
  border-radius: 12px;
  background: #fff;
  color: var(--hcb-primary);
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
}
.hcb-quote-file-btn:hover { background: var(--hcb-light); }
.hcb-quote-file-count { color: #444; font-size: 13px; }

/* ---------- Honeypot ---------- */
.hcb-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ---------- Wizard nav buttons ---------- */
.hcb-quote-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 24px 14px;
  margin-top: 8px;
  background: #fff;
  border-top: 1px solid var(--hcb-border);
}
.hcb-quote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .03em;
  cursor: pointer;
  border: 0;
  transition: .22s ease;
  text-transform: uppercase;
}
.hcb-quote-btn-primary {
  background: var(--hcb-primary);
  color: #fff;
  flex: 1;
  box-shadow: 0 10px 22px rgba(0,94,158,.22);
}
.hcb-quote-btn-primary:hover {
  background: var(--hcb-secondary);
  transform: translateY(-2px);
}
.hcb-quote-btn-ghost {
  background: var(--hcb-light);
  color: var(--hcb-primary);
  border: 1px solid rgba(0,94,158,.24);
}
.hcb-quote-btn-ghost:hover { background: #fff; }
.hcb-quote-btn[disabled] {
  opacity: .8; cursor: progress; transform: none;
}
.hcb-quote-submit-loading::before {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 9px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: hcbSpin .8s linear infinite;
}
@keyframes hcbSpin { to { transform: rotate(360deg); } }

.hcb-quote-foot {
  margin: 6px 24px 18px;
  color: #777;
  font-size: 12px;
  text-align: center;
}

/* ---------- Inline alert (success / error) ---------- */
.hcb-quote-alert {
  margin: 0;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}
.hcb-quote-alert.is-success {
  background: #e9fbf0;
  color: #14532d;
  border-bottom: 1px solid #bbf7d0;
}
.hcb-quote-alert.is-error {
  background: #fef2f2;
  color: #991b1b;
  border-bottom: 1px solid #fecaca;
}

/* ---------- Empty fallback ---------- */
.hcb-form-empty {
  border: 1px dashed rgba(0,94,158,.35);
  border-radius: 24px;
  background: #fff;
  padding: 28px;
  color: #444;
}
.hcb-form-empty h3 { color: #005e9e; margin-bottom: 10px; font-size: 20px; }
.hcb-form-empty ul { margin: 12px 0 0; padding-left: 20px; line-height: 1.9; }
.hcb-form-empty code {
  background: #eaf6ff;
  color: #005e9e;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 13px;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 768px) {
  .hcb-quote-grid-2,
  .hcb-quote-grid-3,
  .hcb-quote-checks { grid-template-columns: 1fr; }

  .hcb-quote-dimensions { grid-template-columns: repeat(2, 1fr); }

  .hcb-quote-head     { padding: 20px; }
  .hcb-quote-progress { padding: 14px 18px 6px; }
  .hcb-quote-form     { padding: 18px 18px 4px; }
  .hcb-quote-actions  { padding: 14px 18px; flex-wrap: wrap; }
  .hcb-quote-btn      { width: 100%; }
  .hcb-quote-title    { font-size: 20px; }
  .hcb-quote-foot     { margin-inline: 18px; }
  .hcb-quote-step-label { display: none; }
  .hcb-quote-step-dots  { justify-content: center; gap: 14px; }
  .hcb-quote-step-dot   { flex: 0 0 auto; }
  .hcb-quote-image-strip { gap: 6px; }
  .hcb-quote-image-thumb { flex: 0 0 48px; width: 48px; height: 48px; }
  .hcb-quote-file-row { flex-direction: column; align-items: stretch; }
  .hcb-quote-file-btn { width: 100%; }
}
