/* ============================================================
   Cascade Sole Atelier — Interactive Components
   Calculator, Custom Checkboxes, Forms, Dropzone, Slider, Modals
   ============================================================ */

/* ---------- Form Alert & Field Errors ---------- */
.form-alert {
  background: var(--color-error-bg);
  border: 1px solid rgba(229, 107, 111, 0.45);
  color: #ffd3d4;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}

.field-error {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--text-xs);
  color: var(--color-error);
  min-height: 0;
}

.field-error:empty {
  display: none;
}

.form-field.has-error input:not([type="checkbox"]),
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(229, 107, 111, 0.16);
}

.form-field.has-error .custom-checkbox {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(229, 107, 111, 0.18);
}

/* ---------- Form Fields ---------- */
.form-field {
  margin-bottom: var(--space-5);
  min-width: 0;
}

.form-field > label:not(.checkbox-label) {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(12, 11, 9, 0.85);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: border-color var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease),
              background var(--duration-fast) var(--ease);
}

.form-field select {
  cursor: pointer;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--color-text-subtle);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(212, 171, 56, 0.18);
  background: var(--color-bg);
}

.form-field textarea {
  resize: vertical;
  min-height: 92px;
}

.field-hint {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4);
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Custom Branded Consent Checkbox ---------- */
.checkbox-field {
  margin-bottom: var(--space-6);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1.5;
  font-weight: 400;
  margin-bottom: 0;
}

.checkbox-label input[type="checkbox"],
.custom-checkbox {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  margin-top: 1px;
  border-radius: 6px;
  background-color: rgba(12, 11, 9, 0.9);
  border: 1.5px solid var(--color-border-strong);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease),
              border-color var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease),
              transform var(--duration-fast) var(--ease);
}

.checkbox-label:hover .custom-checkbox,
.checkbox-label:hover input[type="checkbox"] {
  border-color: var(--color-primary);
  background-color: rgba(212, 171, 56, 0.08);
}

.checkbox-label input[type="checkbox"]:focus-visible,
.custom-checkbox:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(212, 171, 56, 0.24);
}

.checkbox-label input[type="checkbox"]:checked,
.custom-checkbox:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23100e0a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px 13px;
}

.checkbox-label span {
  display: block;
  padding-top: 1px;
}

.checkbox-label a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Modern Cost Calculator ---------- */
.calc-reset-btn {
  margin-left: auto;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-subtle);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-surface-line);
  transition: color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

.calc-reset-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-border-strong);
}

.calc-group {
  margin-bottom: var(--space-6);
}

.calc-label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.calc-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.calc-label-row .calc-label {
  margin-bottom: 0;
}

.calc-subhint {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 500;
}

/* Shoe Type Cards */
.shoe-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.shoe-type-card {
  display: block;
  cursor: pointer;
  position: relative;
  min-width: 0;
}

.shoe-type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shoe-type-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.95rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(12, 11, 9, 0.75);
  border: 1px solid var(--color-surface-line);
  transition: border-color var(--duration-fast) var(--ease),
              background var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease);
  height: 100%;
}

.shoe-type-card:hover .shoe-type-inner {
  border-color: var(--color-border-strong);
  background: rgba(212, 171, 56, 0.04);
}

.shoe-type-card input:checked + .shoe-type-inner {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(212, 171, 56, 0.14), rgba(212, 171, 56, 0.04));
  box-shadow: 0 0 0 1px var(--color-primary);
}

.shoe-type-card input:focus-visible + .shoe-type-inner {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.shoe-type-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(255, 248, 232, 0.04);
  color: var(--color-text-muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.shoe-type-card input:checked + .shoe-type-inner .shoe-type-icon {
  background: var(--color-primary);
  color: #100e0a;
}

.shoe-type-text {
  flex: 1;
  min-width: 0;
}

.shoe-type-text strong {
  display: block;
  font-size: var(--text-sm);
  line-height: 1.25;
}

.shoe-type-text small {
  display: block;
  font-size: 0.72rem;
  color: var(--color-text-subtle);
  margin-top: 2px;
}

.shoe-type-from {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

/* Service Tiles */
.calc-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.service-tile {
  position: relative;
  display: block;
  cursor: pointer;
  min-width: 0;
}

.service-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.service-tile-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(12, 11, 9, 0.75);
  border: 1px solid var(--color-surface-line);
  height: 100%;
  transition: border-color var(--duration-fast) var(--ease),
              background var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease);
}

.service-tile:hover .service-tile-inner {
  border-color: var(--color-border-strong);
}

.service-tile input:checked + .service-tile-inner {
  border-color: var(--color-primary);
  background: rgba(212, 171, 56, 0.11);
  box-shadow: inset 0 0 0 1px rgba(212, 171, 56, 0.35);
}

.service-tile input:focus-visible + .service-tile-inner {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.service-tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

.service-tile-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.service-check-indicator {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--color-border-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.72rem;
  color: transparent;
  transition: all var(--duration-fast) var(--ease);
}

.service-tile input:checked + .service-tile-inner .service-check-indicator {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #100e0a;
}

.service-tile-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.service-tile-desc {
  font-size: 0.72rem;
  color: var(--color-text-subtle);
}

.service-tile-price {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

/* Segmented Control (Urgency / Consult Format) */
.segmented-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-2);
  padding: 5px;
  border-radius: var(--radius-lg);
  background: rgba(12, 11, 9, 0.85);
  border: 1px solid var(--color-surface-line);
}

.segmented-option {
  position: relative;
  cursor: pointer;
  min-width: 0;
}

.segmented-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-option span {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-md);
  text-align: center;
  transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.segmented-option strong {
  font-size: var(--text-sm);
  color: var(--color-text);
}

.segmented-option small {
  font-size: 0.72rem;
  color: var(--color-text-subtle);
}

.segmented-option input:checked + span {
  background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
}

.segmented-option input:checked + span strong,
.segmented-option input:checked + span small {
  color: #100e0a;
}

.segmented-option input:focus-visible + span {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Bottom Row: Urgency + Height-Stabilized Live Summary */
.calc-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: var(--space-6);
  align-items: stretch;
}

.calc-urgency-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calc-summary-box {
  background: linear-gradient(135deg, rgba(212, 171, 56, 0.12) 0%, rgba(12, 11, 9, 0.92) 75%);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  min-height: 156px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calc-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.calc-summary-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.calc-turnaround-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(212, 171, 56, 0.14);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.calc-price-range {
  margin-bottom: var(--space-2);
}

.calc-price-range strong {
  font-family: var(--font-display);
  color: var(--color-primary-hover);
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  letter-spacing: -0.01em;
}

/* Fixed 2-line box so selecting more services never causes layout shift */
.calc-breakdown {
  font-size: var(--text-xs);
  color: var(--color-text);
  margin-bottom: var(--space-2);
  line-height: 1.45;
  min-height: 2.9em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.calc-note {
  font-size: 0.72rem;
  color: var(--color-text-subtle);
}

/* Single-line attached estimate badge above contact inputs (zero vertical shift) */
.attached-estimate-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.65rem 0.9rem;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-md);
  background: rgba(79, 163, 107, 0.1);
  border: 1px solid rgba(79, 163, 107, 0.28);
  font-size: var(--text-xs);
  color: #cbead5;
  min-width: 0;
}

.attached-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
}

.attached-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Dropzone ---------- */
.dropzone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

.dropzone-header small {
  font-weight: 400;
  color: var(--color-text-subtle);
}

.photo-counter {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 2px 9px;
  border-radius: var(--radius-full);
}

.dropzone {
  position: relative;
  min-height: 260px;
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius-xl);
  background: rgba(12, 11, 9, 0.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
  overflow: hidden;
  text-align: center;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--color-primary);
  background: rgba(212, 171, 56, 0.06);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
  pointer-events: none;
  width: 100%;
}

.dropzone-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: var(--color-primary-soft);
  border: 1px solid var(--color-border);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-4);
}

.dropzone-icon {
  color: var(--color-primary);
}

.dropzone-content p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin: 0 0 var(--space-1) 0;
}

.dropzone-content strong {
  color: var(--color-text);
}

.dropzone-hint {
  font-size: var(--text-xs) !important;
  color: var(--color-text-subtle) !important;
  margin-top: var(--space-1) !important;
}

/* Preview thumbnails */
.dropzone-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  padding: var(--space-4);
  width: 100%;
}

.dropzone-preview .thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-soft);
}

.dropzone-preview .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropzone-preview .thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  background: rgba(12, 11, 9, 0.86);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background var(--duration-fast) var(--ease);
}

.dropzone-preview .thumb-remove:hover {
  background: var(--color-error);
}

.thumb-add {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--color-border-strong);
  background: rgba(212, 171, 56, 0.04);
  color: var(--color-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

.thumb-add:hover {
  background: rgba(212, 171, 56, 0.12);
  border-color: var(--color-primary);
}

.compression-status {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-3) var(--space-4);
  background: rgba(12, 11, 9, 0.94);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-align: center;
}

.photo-tips {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: rgba(255, 248, 232, 0.025);
  border: 1px solid var(--color-surface-line);
}

.photo-tips-title {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.photo-tips ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.photo-tips li {
  font-size: 0.72rem;
  color: var(--color-text-subtle);
  background: rgba(255, 248, 232, 0.04);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

/* ---------- Before / After Slider ---------- */
.before-after {
  position: relative;
  width: 100%;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

.ba-images {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--color-bg-soft);
}

.ba-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-before {
  z-index: 1;
}

.ba-after {
  z-index: 2;
  clip-path: inset(0 0 0 50%);
}

.ba-slider {
  position: absolute;
  inset: 0;
  z-index: 4;
  cursor: ew-resize;
  background: transparent;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--color-primary);
  z-index: 3;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.75);
}

.ba-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  border: 2px solid #fff6dc;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23100e0a' stroke-width='2.5'%3E%3Cpath d='M8 6L4 12l4 6M16 6l4 6-4 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--duration-fast) var(--ease);
}

.ba-images.is-dragging .ba-handle::before {
  transform: translate(-50%, -50%) scale(1.08);
}

.ba-images::before,
.ba-images::after {
  position: absolute;
  top: 12px;
  z-index: 5;
  padding: 4px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  pointer-events: none;
}

.ba-images::before {
  content: "Before";
  left: 12px;
  background: rgba(12, 11, 9, 0.78);
  backdrop-filter: blur(6px);
  color: #fff;
}

.ba-images::after {
  content: "After";
  right: 12px;
  background: var(--color-primary);
  color: #100e0a;
}

/* ---------- Time Slots ---------- */
.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: var(--space-2);
}

.time-slot {
  display: block;
  cursor: pointer;
  position: relative;
}

.time-slot input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.time-slot span {
  display: block;
  padding: 0.65rem 0.5rem;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 500;
  background: rgba(12, 11, 9, 0.85);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease);
}

.time-slot:hover span {
  border-color: var(--color-border-strong);
}

.time-slot input:checked + span {
  background: var(--color-primary);
  color: #100e0a;
  border-color: var(--color-primary);
  font-weight: 700;
}

/* ---------- Star Rating ---------- */
.star-rating {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.star-rating label {
  cursor: pointer;
  margin-bottom: 0;
  position: relative;
}

.star-rating input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.star-rating span {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  background: rgba(12, 11, 9, 0.85);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease);
}

.star-rating label:hover span,
.star-rating input:checked + span {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ---------- Modals ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration) var(--ease), visibility var(--duration) var(--ease);
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  z-index: 1;
  transform: translateY(12px) scale(0.98);
  transition: transform var(--duration) var(--ease);
}

.modal.is-open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text-muted);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  transition: color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
  z-index: 2;
}

.modal-close:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.1);
}

.modal-content {
  padding: var(--space-8);
}

.modal-content h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
  padding-right: var(--space-8);
}

.modal-lead {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
  line-height: var(--leading-relaxed);
}

/* ---------- Loading state ---------- */
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: #100e0a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

[hidden] {
  display: none !important;
}

/* ---------- Component Responsive ---------- */
@media (max-width: 960px) {
  .shoe-type-grid,
  .calc-services-grid,
  .calc-bottom-grid {
    grid-template-columns: 1fr;
  }

  .quote-step-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .modal-content {
    padding: var(--space-6);
  }
}
