/* Aixo Lab — Pottery booking concept. Self-contained, no external resources. */

:root {
  --page-bg: #F5F1EB;
  --surface: #FFFFFF;
  --text: #242A27;
  --text-secondary: #56615A;
  --action: #24483D;
  --action-dark: #1B372E;
  --terracotta: #B66A4A;
  --terracotta-tint: #F3E4DC;
  --border: #DDDCD5;
  --error: #A6432B;
  --radius-card: 20px;
  --radius-control: 12px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

/* Guard against later `display` rules of equal specificity overriding
   the native [hidden] behaviour (e.g. .progress-steps { display: flex }). */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -60px;
  background: var(--text);
  color: #FFFFFF;
  padding: var(--space-1) var(--space-3);
  border-radius: 4px;
  z-index: 100;
  transition: top 0.15s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-3);
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}

/* Header — neutral presentation, independent of the concept's own palette */
.app-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) var(--space-4);
}

.app-header-row {
  max-width: 1100px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.app-header h1 {
  font-size: 20px;
  margin: 0;
  color: var(--text);
}

.back-link {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.back-link:hover {
  color: var(--text-secondary);
}

.concept-badge {
  max-width: 1100px;
  margin: var(--space-1) auto 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

@media (max-width: 479px) {
  .app-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }
}

/* noscript */
.noscript-panel {
  background: #FBEAEA;
  border: 1px solid var(--error);
  color: var(--error);
  border-radius: var(--radius-control);
  padding: var(--space-4);
  margin: var(--space-4) auto;
  max-width: 680px;
  font-weight: 600;
}

.noscript-panel a {
  color: var(--error);
}

/* Layout */
.page-layout {
  max-width: 1100px;
  margin-inline: auto;
  padding: var(--space-3) var(--space-3) 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.context-panel {
  display: none;
  max-width: 300px;
}

.context-panel h2 {
  font-size: 20px;
  margin: 0 0 var(--space-2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-vessel-mark {
  width: 22px;
  height: 22px;
  color: var(--terracotta);
  flex-shrink: 0;
}

.context-panel > p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 var(--space-3);
}

.context-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.context-feature-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text);
}

.context-feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--terracotta);
}

@media (min-width: 900px) {
  .page-layout {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 56px;
    padding-top: var(--space-5);
  }

  .context-panel {
    display: block;
    padding-top: var(--space-5);
  }
}

/* App shell */
.app-shell {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  box-shadow: 0 2px 10px rgba(36, 42, 39, 0.06);
}

@media (max-width: 479px) {
  .page-layout {
    padding-inline: var(--space-3);
  }

  .app-shell {
    padding: var(--space-3);
  }
}

/* Progress */
.progress-steps {
  list-style: none;
  display: flex;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  padding: 0 0 var(--space-3);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.progress-steps li[aria-current="step"] {
  color: var(--action);
  font-weight: 700;
  text-decoration: underline;
}

/* Step transitions */
.step-panel {
  opacity: 1;
}

.step-panel.is-entering {
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .step-panel {
    transition: opacity 160ms ease;
  }
}

/* Step heading / intro */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 var(--space-1);
}

.step-heading {
  font-size: 20px;
  margin: 0 0 var(--space-1);
}

.step-heading:focus-visible {
  outline: none;
}

.step-intro {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 var(--space-4);
}

.step-actions {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-3);
}

.step-actions-split {
  justify-content: space-between;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-control);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease, transform 100ms ease;
  }

  .btn:active {
    transform: scale(0.98);
  }
}

.btn-primary {
  background: var(--action);
  color: #FFFFFF;
  border-color: var(--action);
}

.btn-primary:hover {
  background: var(--action-dark);
  border-color: var(--action-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--action);
  border-color: var(--action);
}

.btn-secondary:hover {
  background: var(--action);
  color: #FFFFFF;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--action);
  color: var(--action);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.icon-btn:hover {
  border-color: var(--action);
  color: var(--action);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.icon-btn .icon-arrow-left {
  transform: rotate(180deg);
}

/* Fieldsets */
.option-fieldset {
  border: none;
  margin: 0 0 var(--space-3);
  padding: 0;
}

.group-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 var(--space-2);
}

/* Hero visual */
.hero-visual {
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: var(--space-4);
  aspect-ratio: 2 / 1;
  background: #EFE7DA;
}

.hero-illustration {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
}

/* Service cards */
#service-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.service-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
}

.service-card.is-selected {
  border-color: var(--action);
}

@media (prefers-reduced-motion: no-preference) {
  .service-card {
    transition: border-color 140ms ease, background-color 140ms ease;
  }
}

.service-select {
  display: block;
  cursor: pointer;
  padding: var(--space-3);
}

.service-card.is-selected .service-select {
  background: #F0F4F2;
}

.service-select input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.service-select-visual {
  display: flex;
  gap: var(--space-3);
}

.service-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-control);
  overflow: hidden;
  background: #EFE7DA;
}

.service-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-body {
  flex: 1;
  min-width: 0;
}

.service-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.service-name {
  font-weight: 700;
  font-size: 16px;
  width: 100%;
}

.selected-flag {
  display: none;
  align-items: center;
  gap: 4px;
  color: var(--action);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.service-card.is-selected .selected-flag {
  display: inline-flex;
}

.selected-flag .icon {
  width: 15px;
  height: 15px;
}

.service-tag {
  display: inline-block;
  margin-top: 4px;
  background: var(--terracotta-tint);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
}

.service-desc {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 6px;
}

.service-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--action);
  font-weight: 600;
  font-size: 13px;
  margin-top: var(--space-2);
}

.service-meta .icon {
  width: 15px;
  height: 15px;
  color: var(--action);
}

/* Disclosure */
.disclosure-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 10px var(--space-3);
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.disclosure-toggle .icon {
  width: 16px;
  height: 16px;
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: no-preference) {
  .disclosure-toggle .icon {
    transition: transform 160ms ease;
  }
}

.disclosure-toggle[aria-expanded="true"] .icon {
  transform: rotate(-90deg);
}

.disclosure-panel {
  padding: 0 var(--space-3) var(--space-3);
  background: #FAF7F2;
}

.disclosure-panel ul {
  margin: var(--space-2) 0 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13px;
}

.disclosure-panel li {
  margin-bottom: 4px;
}

.price-note {
  color: var(--text-secondary);
  font-size: 13px;
  margin: var(--space-1) 0 0;
}

.imagery-note {
  color: var(--text-secondary);
  font-size: 12px;
  margin: var(--space-3) 0 0;
  text-align: center;
}

/* Class summary (steps 2/3/4) */
.class-summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--terracotta-tint);
  border-radius: var(--radius-control);
  padding: var(--space-3);
  margin: 0 0 var(--space-4);
}

.class-summary-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: #EFE7DA;
}

.class-summary-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.class-summary-body strong {
  display: block;
  font-size: 15px;
}

.class-summary-body span {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Calendar */
.calendar {
  margin-bottom: var(--space-2);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.calendar-month-label {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-cell-blank {
  aspect-ratio: 1;
}

.calendar-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: #FAF7F2;
}

.calendar-cell input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.calendar-cell.is-selected {
  background: var(--action);
  color: #FFFFFF;
  border-color: var(--action);
}

.calendar-cell.is-disabled {
  background: transparent;
  color: var(--text-secondary);
  opacity: 0.4;
  cursor: not-allowed;
}

/* Time chips */
.option-grid {
  display: grid;
  gap: var(--space-2);
}

.time-grid {
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}

.option-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius-control);
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
  position: relative;
}

.option-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.option-chip.is-selected {
  border-color: var(--action);
  background: #F0F4F2;
}

.chip-label {
  font-weight: 700;
  font-size: 14px;
}

.option-chip.is-selected .chip-label {
  color: var(--action);
}

.chip-status {
  font-size: 11px;
  color: var(--text-secondary);
}

.option-chip.is-disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Errors */
.field-error {
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
  margin: var(--space-1) 0 0;
}

/* Review summary */
.summary-list {
  margin: 0 0 var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  overflow: hidden;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.summary-row dt .icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.summary-row dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.text-secondary {
  color: var(--text-secondary);
  font-size: 14px;
}

.review-edit-row {
  display: flex;
  gap: var(--space-3);
  margin: var(--space-3) 0;
  flex-wrap: wrap;
}

/* Confirmation */
.confirmation-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--action);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
}

.icon-check-lg {
  width: 28px;
  height: 28px;
}

@media (prefers-reduced-motion: no-preference) {
  .confirmation-icon {
    animation: confirmation-pop 200ms ease-out;
  }
}

@keyframes confirmation-pop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.confirmation-heading {
  text-align: center;
}

#step-confirmation > .text-secondary {
  text-align: center;
  margin-bottom: var(--space-3);
}

#step-confirmation .step-actions {
  justify-content: center;
}

.commercial-cta {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.commercial-cta h3 {
  font-size: 16px;
  margin: 0 0 var(--space-1);
}

.commercial-cta p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 var(--space-3);
}

/* Reduced motion: neutralise everything not explicitly guarded above */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
