/* =====================================================================
   Concrete Inspection Specialist — Forms & booking flow
   ===================================================================== */

.book-layout { display: grid; grid-template-columns: 1.25fr 0.85fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 940px) { .book-layout { grid-template-columns: 1fr; } }

.form-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

/* Progress / stepper */
.stepper { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.9rem; }
.stepper__item { display: flex; align-items: center; gap: 0.6rem; }
.stepper__dot {
  width: 30px; height: 30px; border-radius: var(--r-pill);
  display: grid; place-items: center; flex: none;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600;
  background: var(--steel-100); color: var(--steel-500);
  border: 1px solid var(--border);
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.stepper__label {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--steel-500); white-space: nowrap;
}
.stepper__line { flex: 1 1 auto; height: 2px; background: var(--border); min-width: 12px; }
.stepper__item.is-active .stepper__dot { background: var(--accent-600); color: #fff; border-color: var(--accent-600); }
.stepper__item.is-active .stepper__label { color: var(--accent-700); }
.stepper__item.is-done .stepper__dot { background: var(--ok); color: #fff; border-color: var(--ok); }
@media (max-width: 560px) { .stepper__label { display: none; } }

.step-panel { display: none; }
.step-panel.is-active { display: block; animation: fade-in var(--t) var(--ease-out); }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .step-panel.is-active { animation: none; } }

.step-panel__title { font-size: 1.4rem; margin-bottom: 0.4rem; }
.step-panel__hint { color: var(--steel-600); margin-bottom: 1.5rem; font-size: 0.98rem; }

/* Dropzone */
.dropzone {
  position: relative;
  border: 2px dashed var(--border-strong); border-radius: var(--r-lg);
  background: var(--paper-2);
  padding: 2rem 1.5rem; text-align: center; cursor: pointer;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-050); }
.dropzone.is-drag { border-color: var(--accent); background: var(--accent-050); box-shadow: var(--ring); }
.dropzone__icon { width: 46px; height: 46px; margin: 0 auto 0.8rem; color: var(--accent-600); }
.dropzone__title { font-weight: 600; color: var(--ink); }
.dropzone__sub { color: var(--steel-500); font-size: 0.9rem; margin-top: 0.3rem; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.photo-meter { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.1rem 0 0.4rem; }
.photo-meter__count { font-family: var(--font-mono); font-size: 0.85rem; color: var(--steel-600); }
.photo-meter__count b { color: var(--ink); }
.photo-meter__count.is-ok b { color: var(--ok); }
.photo-bar { height: 6px; border-radius: var(--r-pill); background: var(--steel-100); overflow: hidden; flex: 1 1 auto; max-width: 220px; }
.photo-bar__fill { height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width var(--t) var(--ease); }
.photo-bar__fill.is-ok { background: var(--ok); }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.7rem; margin-top: 1rem; }
.thumb { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); background: var(--steel-100); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__rm {
  position: absolute; top: 5px; right: 5px; width: 26px; height: 26px;
  border-radius: var(--r-pill); border: none; cursor: pointer;
  background: rgba(14,17,22,0.72); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(2px);
}
.thumb__rm:hover { background: var(--danger); }
.thumb__rm svg { width: 14px; height: 14px; }

/* Fields */
.field { margin-bottom: 1.2rem; }
.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field__row { grid-template-columns: 1fr; } }
.label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.4rem; color: var(--ink); }
.label .req { color: var(--danger); margin-left: 0.15em; }
.label .opt { color: var(--steel-400); font-weight: 400; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; margin-left: 0.4em; }
.input, .textarea, .select {
  width: 100%; padding: 0.75rem 0.9rem;
  background: var(--white); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  font-size: 1rem; color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--steel-400); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.textarea { resize: vertical; min-height: 110px; }
.help { margin-top: 0.4rem; font-size: 0.84rem; color: var(--steel-500); }
.error-msg { margin-top: 0.4rem; font-size: 0.85rem; color: var(--danger); display: none; align-items: center; gap: 0.35rem; }
.error-msg svg { width: 1rem; height: 1rem; flex: none; }
.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: var(--danger); }
.field.has-error .error-msg { display: flex; }

.form-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; }
.form-actions--end { justify-content: flex-end; }

/* Review list */
.review-list { display: grid; gap: 0.75rem; margin: 0.5rem 0 0.5rem; }
.review-row { display: grid; grid-template-columns: 130px 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.review-row dt { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel-500); }
.review-row dd { color: var(--ink); }
@media (max-width: 480px) { .review-row { grid-template-columns: 1fr; gap: 0.2rem; } }

/* Success state */
.book-success { display: none; text-align: center; padding: 1rem 0; }
.book-success.is-shown { display: block; animation: fade-in var(--t-slow) var(--ease-out); }
.success-mark {
  width: 76px; height: 76px; border-radius: var(--r-pill); margin: 0 auto 1.4rem;
  background: var(--ok-050); color: var(--ok); display: grid; place-items: center;
  border: 1px solid #bfe3d6;
}
.success-mark svg { width: 38px; height: 38px; }

/* Aside (what happens next) */
.book-aside { display: grid; gap: 1.25rem; position: sticky; top: calc(var(--header-h) + 1.25rem); }
@media (max-width: 940px) { .book-aside { position: static; } }
.aside-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.5rem; }
.aside-card--dark { background: var(--steel-950); color: var(--steel-300); border-color: var(--steel-800); }
.aside-card--dark h3 { color: #fff; }
.mini-steps { display: grid; gap: 1rem; margin-top: 1rem; }
.mini-step { display: flex; gap: 0.8rem; align-items: flex-start; }
.mini-step__n {
  flex: none; width: 26px; height: 26px; border-radius: var(--r-pill);
  background: rgba(58,160,224,0.16); color: var(--accent-bright);
  font-family: var(--font-mono); font-size: 0.8rem; display: grid; place-items: center;
}
.aside-card:not(.aside-card--dark) .mini-step__n { background: var(--accent-050); color: var(--accent-700); }
.mini-step p { font-size: 0.92rem; }
.mini-step b { color: var(--ink); }
.aside-card--dark .mini-step b { color: #fff; }

/* Submit spinner */
.spinner {
  width: 1.05em; height: 1.05em; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  display: inline-block; vertical-align: -0.15em;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1.4s; } }
