/* Phase 1 functional screens use the approved v0.3 tokens and components. */

.phase1-empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px 22px;
  border: 1px dashed var(--brand-200);
  border-radius: 22px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.phase1-empty-state--page {
  max-width: 720px;
  margin: 40px auto;
}

.phase1-empty-state__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--brand-100);
  font-size: 28px;
}

.phase1-empty-state h1,
.phase1-empty-state h2 {
  margin: 0;
  color: var(--ink-950);
}

.phase1-empty-state h2 { font-size: 18px; }
.phase1-empty-state p { max-width: 530px; margin: 0; color: var(--ink-600); font-size: 12px; line-height: 1.6; }

.phase1-empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 5px;
}

.phase1-detail-page,
.phase1-request-page {
  padding-top: 18px;
  padding-bottom: 96px;
}

.phase1-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin-bottom: 15px;
  color: var(--brand-800);
  font-size: 11px;
  font-weight: 850;
}

.phase1-detail-hero {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 15px;
  padding: 16px;
  border: 1px solid var(--ink-100);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.phase1-detail-hero__visual {
  min-height: 104px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--brand-100), var(--brand-200));
  font-size: 44px;
}

.phase1-detail-hero__visual.result-card--swim { background: linear-gradient(145deg, var(--blue-100), #b7ddff); }
.phase1-detail-hero__visual.result-card--gym { background: linear-gradient(145deg, var(--purple-100), #d8c7ff); }
.phase1-detail-hero__visual.result-card--tennis { background: linear-gradient(145deg, var(--lime-100), var(--lime-300)); }

.phase1-detail-hero__copy { min-width: 0; }
.phase1-detail-hero__copy .section-kicker { margin: 8px 0 0; }
.phase1-detail-hero h1 { margin: 4px 0 3px; font-size: clamp(22px, 5vw, 38px); line-height: 1.06; letter-spacing: -0.035em; }
.phase1-provider-name { margin: 0; color: var(--ink-600); font-size: 12px; font-weight: 800; }
.phase1-rating-line { margin-top: 9px; }
.phase1-detail-trust { margin-top: 11px; }

.phase1-detail-grid {
  display: grid;
  gap: 15px;
  margin-top: 15px;
}

.phase1-detail-panel {
  padding: 17px;
  border: 1px solid var(--ink-100);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.phase1-panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.phase1-panel-heading .section-kicker,
.phase1-detail-panel .section-kicker { margin: 0; }
.phase1-panel-heading h2,
.phase1-detail-panel h2 { margin: 4px 0 0; font-size: 17px; }
.phase1-static-favourite { position: static; flex: 0 0 auto; }

.phase1-detail-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 15px;
}

.phase1-detail-fact {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 11px;
  border-radius: 14px;
  background: var(--ink-50);
  color: var(--ink-700);
  font-size: 11px;
  font-weight: 720;
}

.phase1-detail-fact .icon { color: var(--brand-700); flex: 0 0 auto; }

.phase1-copy-block {
  margin-top: 19px;
  padding-top: 18px;
  border-top: 1px solid var(--ink-100);
}

.phase1-copy-block h2 { margin: 0 0 7px; font-size: 15px; }
.phase1-copy-block p,
.phase1-detail-panel > p { margin: 0; color: var(--ink-600); font-size: 11px; line-height: 1.65; }

.phase1-detail-sidebar {
  display: grid;
  gap: 13px;
  align-content: start;
}

.phase1-action-panel .availability { margin-bottom: 13px; }
.phase1-action-panel h2 { margin-bottom: 8px; font-size: 24px; }
.phase1-action-panel .button-full { margin-top: 10px; }
.phase1-contact-note { margin-top: 11px !important; font-size: 9px !important; text-align: center; }

.phase1-date-list {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}

.phase1-date-list div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--ink-700);
  background: var(--brand-50);
  font-size: 10px;
  font-weight: 800;
}

.phase1-date-list .icon { color: var(--brand-700); }

.phase1-mini-map {
  position: relative;
  min-height: 145px;
  display: grid;
  place-items: center;
  gap: 7px;
  margin-top: 13px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--brand-100);
  border-radius: 17px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.52) 25%, transparent 25%) 0 0 / 38px 38px,
    linear-gradient(-45deg, rgba(255,255,255,.52) 25%, transparent 25%) 0 19px / 38px 38px,
    #deeee8;
  color: var(--brand-900);
  text-align: center;
  font-size: 10px;
  font-weight: 850;
}

.phase1-map-pin {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 17px 17px 17px 4px;
  transform: rotate(-45deg);
  background: var(--brand-700);
  box-shadow: var(--shadow-sm);
  font-size: 23px;
}

.phase1-map-pin > span { display: block; transform: rotate(45deg); }

.phase1-request-intro {
  max-width: 760px;
  padding: 24px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
}

.phase1-request-intro h1 { margin: 11px 0 8px; font-size: clamp(28px, 7vw, 48px); letter-spacing: -0.045em; }
.phase1-request-intro p { max-width: 650px; margin: 0; color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.65; }

.phase1-request-form,
.phase1-request-success {
  max-width: 760px;
  margin-top: 15px;
  padding: 19px;
  border: 1px solid var(--ink-100);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.phase1-form-grid { display: grid; gap: 13px; }

.phase1-form-field { display: grid; gap: 6px; }
.phase1-form-field > span { color: var(--ink-800); font-size: 10px; font-weight: 850; }
.phase1-form-field input,
.phase1-form-field select,
.phase1-form-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--ink-200);
  border-radius: 13px;
  color: var(--ink-900);
  background: #fff;
  font: inherit;
  font-size: 12px;
}
.phase1-form-field textarea { resize: vertical; }
.phase1-request-form .primary-button { margin-top: 15px; }

.phase1-request-success { text-align: center; }
.phase1-request-success > span { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 50%; background: var(--brand-100); color: var(--brand-800); font-size: 24px; font-weight: 900; }
.phase1-request-success h2 { margin: 0; }
.phase1-request-success p { max-width: 580px; margin: 8px auto 15px; color: var(--ink-600); font-size: 11px; line-height: 1.6; }

@media (min-width: 560px) {
  .phase1-detail-facts,
  .phase1-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase1-form-field--wide { grid-column: 1 / -1; }
}

@media (min-width: 760px) {
  .phase1-detail-page,
  .phase1-request-page { padding-top: 24px; padding-bottom: 48px; }
  .phase1-detail-hero { grid-template-columns: 145px minmax(0, 1fr); padding: 22px; }
  .phase1-detail-hero__visual { min-height: 150px; font-size: 62px; }
  .phase1-detail-grid { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); align-items: start; }
  .phase1-detail-sidebar { position: sticky; top: 96px; }
  .phase1-detail-panel { padding: 21px; }
}

.results-list > .button-full:disabled,
.location-pill:disabled {
  cursor: wait;
  opacity: .7;
}

.results-map.phase1-map-open {
  display: block;
  position: relative;
  top: auto;
  min-height: 520px;
  height: min(70vh, 680px);
  grid-column: 1 / -1;
}

@media (max-width: 759px) {
  .results-map.phase1-map-open {
    margin-top: 2px;
    border-radius: 21px;
  }
}
