:root {
  color-scheme: light;
  --bg: #eef6f3;
  --card: #ffffff;
  --text: #16221f;
  --muted: #62726e;
  --border: #d7e2de;
  --focus: #0f766e;
  --focus-soft: #f0fdfa;
  --button: #0f766e;
  --button-hover: #115e59;
  --button-text: #ffffff;
  --error: #b42318;
  --error-bg: #fff1f0;
  --success: #067647;
  --success-bg: #ecfdf3;
  --shadow: 0 24px 70px rgba(17, 46, 39, 0.14);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.95), rgba(238, 246, 243, 0.2)),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

.site-header {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 20px 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.brand::before {
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.16);
  content: "";
}

.page-shell {
  display: grid;
  min-height: calc(100vh - 62px);
  place-items: center;
  padding: 18px;
}

.request-card {
  width: min(100%, 920px);
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid rgba(215, 226, 222, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.intro {
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--focus);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 0;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.subtitle {
  max-width: 640px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.form-step {
  display: grid;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.form-step:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.progressive-panel {
  overflow: hidden;
  max-height: 1200px;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 220ms ease,
    opacity 180ms ease,
    transform 180ms ease,
    padding 180ms ease,
    margin 180ms ease,
    border-width 180ms ease;
}

.progressive-panel.is-hidden {
  max-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--focus);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
}

.step-heading h2 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.field,
.field label {
  display: grid;
  gap: 8px;
}

.field span,
.availability legend {
  color: #33413d;
  font-size: 0.93rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

input:focus,
select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.field-error input,
.field-error select {
  border-color: var(--error);
  background: #fffafa;
}

.field-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.field-note.is-hidden {
  display: none;
}

.availability {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.availability legend {
  margin: 0 0 8px;
}

.availability-options {
  display: grid;
  gap: 10px;
}

.availability-status {
  margin: 0;
  padding: 11px 12px;
  border-radius: 8px;
  background: #f7fbfa;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.availability-status.is-hidden {
  display: none;
}

.availability-status.is-error {
  background: var(--error-bg);
  color: var(--error);
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.radio-card:has(input:checked) {
  border-color: var(--focus);
  background: var(--focus-soft);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.radio-card input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--focus);
}

.calendar-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}

.calendar-wrap.is-hidden {
  display: none;
}

.weekly-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 10px;
  min-width: 860px;
}

.calendar-day {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfffe;
}

.calendar-day-title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 4px 0 8px;
  background: #fbfffe;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.slot-button {
  display: grid;
  gap: 2px;
  align-content: center;
  min-height: 38px;
  width: 100%;
  border: 1px solid #c8d8d3;
  border-radius: 8px;
  background: #ffffff;
  color: #31433f;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 750;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.slot-button small {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
}

.slot-button:hover {
  border-color: var(--focus);
}

.slot-button.is-available {
  border-color: #9bd8c5;
  background: #f0fdfa;
  color: #155e4e;
}

.slot-button.is-selected {
  border-color: var(--focus);
  background: var(--focus);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.18);
}

.slot-button.is-disabled-option {
  border-color: #d9e2df;
  background: #f3f5f4;
  color: #7b8985;
  box-shadow: none;
}

.calendar-empty {
  min-height: 38px;
  padding: 10px 6px;
  border: 1px dashed #d9e2df;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.availability.field-error {
  padding: 12px;
  border: 1px solid var(--error);
  border-radius: 8px;
  background: var(--error-bg);
}

.form-footer {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--button);
  color: var(--button-text);
  cursor: pointer;
  font-weight: 800;
  transition:
    background-color 150ms ease,
    transform 150ms ease,
    opacity 150ms ease;
}

.primary-button:hover {
  background: var(--button-hover);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.disabled-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  cursor: not-allowed;
  font-weight: 800;
  opacity: 1;
}

input:disabled,
select:disabled,
.slot-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.is-submitted input:disabled,
.is-submitted select:disabled,
.is-submitted .radio-card {
  background: #f8faf9;
}

.form-message {
  display: none;
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
}

.form-message.is-visible {
  display: block;
}

.form-message.is-error {
  background: var(--error-bg);
  color: var(--error);
}

.form-message.is-success {
  background: var(--success-bg);
  color: var(--success);
}

.success-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(6, 118, 71, 0.22);
  border-radius: 8px;
  background: var(--success-bg);
  color: var(--success);
  text-align: center;
}

.success-panel.is-hidden {
  display: none;
}

.success-title,
.success-subtitle {
  margin: 0;
  line-height: 1.45;
}

.success-title {
  font-weight: 800;
}

.success-subtitle {
  color: #315f4c;
  font-size: 0.95rem;
  font-weight: 650;
}

.success-actions {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  width: min(100%, 280px);
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--button);
  color: var(--button-text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    transform 150ms ease;
}

.whatsapp-button:hover {
  background: var(--button-hover);
}

.whatsapp-button:active {
  transform: translateY(1px);
}

@media (min-width: 720px) {
  .site-header {
    padding-top: 28px;
  }

  .page-shell {
    min-height: calc(100vh - 70px);
    padding: 26px;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .availability-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-footer {
    grid-template-columns: 1fr minmax(220px, 260px);
    align-items: start;
  }

  .primary-button {
    width: auto;
  }

  .disabled-submit-button {
    width: auto;
  }
}
