/*
 * Styles for the parts of the AI-booking surface that JavaScript renders.
 *
 * Plain CSS with semantic class names rather than Tailwind utilities, for one
 * reason: the Tailwind Play CDN generates classes by watching the DOM, and the
 * booking flow injects its markup after that first pass. Utilities would
 * usually be picked up — but "usually" is not a property you want in the one
 * screen you open on a sales call. The palette below mirrors the Tailwind
 * theme in each page's head, so the two halves match.
 */

:root {
  --sand: #f5f1eb;
  --stone: #e8e2d9;
  --forest: #2d3e36;
  --ocean: #4a6670;
  --warm: #c4a77d;
  --charcoal: #1a1a1a;
  --line: rgba(45, 62, 54, 0.16);
  --serif: "Cormorant Garamond", Georgia, serif;
}

/* ── buttons ─────────────────────────────────────────────────────────────── */

.sg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 0;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease;
}
.sg-btn-primary {
  background: var(--forest);
  color: #fff;
}
.sg-btn-primary:hover:not(:disabled) {
  background: #22302a;
}
.sg-btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--forest);
}
.sg-btn-outline:hover {
  border-color: var(--forest);
  background: rgba(45, 62, 54, 0.04);
}
.sg-btn-quiet {
  background: transparent;
  color: var(--ocean);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 5px;
  padding-left: 0;
  padding-right: 0;
}
.sg-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* ── the engine picker ───────────────────────────────────────────────────── */

.sg-engines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 0 auto;
  max-width: 880px;
}

/*
 * Live and inert tiles are styled identically — same surface, border and
 * opacity; only `pointer-events` differs. The row is the argument (these are
 * the assistants a guest arrives from), and dimming two of them tells the
 * opposite story.
 */
.sg-engine {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 132px;
  padding: 24px 16px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--forest);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:
    transform 0.35s ease,
    border-color 0.35s ease;
}
.sg-engine:hover {
  border-color: var(--forest);
  transform: translateY(-2px);
}
.sg-engine[data-disabled="true"] {
  pointer-events: none;
}

/* ── panels and forms ────────────────────────────────────────────────────── */

.sg-panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 28px;
}
.sg-step {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--forest);
  margin: 28px 0 14px;
}
.sg-step:first-child {
  margin-top: 0;
}

.sg-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
}
.sg-field {
  display: grid;
  gap: 7px;
}
.sg-field-wide {
  grid-column: 1 / -1;
}
.sg-field label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.55);
}
.sg-input {
  width: 100%;
  padding: 13px 14px;
  background: var(--sand);
  border: 1px solid var(--line);
  color: var(--charcoal);
  font: inherit;
  font-size: 15px;
}
.sg-input:focus {
  outline: none;
  border-color: var(--forest);
}

.sg-hint {
  font-size: 13px;
  color: rgba(26, 26, 26, 0.5);
  margin-top: 10px;
  line-height: 1.6;
}
.sg-status {
  font-size: 14px;
  color: var(--ocean);
  margin-top: 14px;
}
.sg-error {
  font-size: 14px;
  color: #8c3a2b;
  margin-top: 14px;
}

/* ── rooms ───────────────────────────────────────────────────────────────── */

.sg-rooms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.sg-room {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--sand);
  border: 1px solid var(--line);
}
.sg-room[data-selected="true"] {
  border-color: var(--forest);
  background: #fff;
}
.sg-room h4 {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--forest);
  margin: 0 0 5px;
}
.sg-room p {
  margin: 0;
  font-size: 13.5px;
  color: rgba(26, 26, 26, 0.6);
}
.sg-room-price {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}
.sg-room-price strong {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  color: var(--forest);
}
.sg-room-price span {
  font-size: 12px;
  color: rgba(26, 26, 26, 0.5);
}

.sg-policies {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: rgba(26, 26, 26, 0.6);
  line-height: 1.6;
}
.sg-policies li {
  padding-left: 16px;
  position: relative;
}
.sg-policies li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--warm);
}

.sg-confirm {
  margin-top: 26px;
  padding: 26px;
  background: var(--sand);
  border: 1px solid var(--forest);
  display: grid;
  gap: 14px;
  justify-items: start;
}
.sg-confirm h4 {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--forest);
  margin: 0;
}
.sg-confirm p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(26, 26, 26, 0.75);
}
.sg-break {
  word-break: break-all;
  font-size: 12.5px;
}

/* ── the machine surface ─────────────────────────────────────────────────── */

.sg-kv {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 10px 22px;
  margin: 0;
  font-size: 13.5px;
}
.sg-kv dt {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(26, 26, 26, 0.45);
  padding-top: 2px;
}
.sg-kv dd {
  margin: 0;
  color: var(--charcoal);
  word-break: break-word;
}
.sg-pre {
  margin: 0;
  padding: 22px;
  background: var(--forest);
  color: #e7ece9;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre;
}

/* ── the Human / Machine dock ────────────────────────────────────────────── */

/*
 * The dock never leaves the viewport. It appears only once there is somewhere
 * to go: a guest lands on a hotel, and a Human/Machine switch on a cold page
 * is our vocabulary shown to someone who has not asked for it.
 */
.sg-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.sg-dock-note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(26, 26, 26, 0.6);
  max-width: 62ch;
}
.sg-slider {
  display: inline-flex;
  padding: 3px;
  background: var(--stone);
  border-radius: 999px;
  flex-shrink: 0;
}
.sg-slider button {
  border: 0;
  background: transparent;
  padding: 9px 24px;
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.55);
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}
.sg-slider button[aria-pressed="true"] {
  background: var(--forest);
  color: #fff;
}

/* Room for the dock, so it never sits on top of the last line of the page. */
.sg-has-dock {
  padding-bottom: 128px;
}

@media (max-width: 700px) {
  .sg-dock {
    justify-content: center;
    text-align: center;
  }
  .sg-room {
    flex-direction: column;
    align-items: flex-start;
  }
  .sg-room-price {
    justify-items: start;
    text-align: left;
  }
}
