/* Guest booking screen. Design tokens, buttons, brand and .eyebrow come from styles.css,
   which is loaded first; this file only adds what is specific to booking.html. */

.trip-body {
  background: var(--ivory);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.trip-header {
  align-items: center;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 76px);
}

.trip-nav {
  align-items: center;
  display: flex;
  gap: clamp(16px, 3vw, 32px);
}

.trip-nav > a:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}

.trip-nav > a:first-child:hover {
  color: var(--iron);
}

.trip-main {
  flex: 1;
  margin: 0 auto;
  max-width: 1120px;
  padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 48px) 80px;
  width: 100%;
}

/* ---------- Reference entry ---------- */

.trip-lookup {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 620px;
  padding: clamp(28px, 5vw, 48px);
}

.trip-lookup h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.05;
  margin: 0 0 14px;
}


.trip-lookup-copy {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 28px;
}

.trip-lookup-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  margin-bottom: 9px;
  text-transform: uppercase;
}

.trip-lookup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.trip-lookup-row input {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 12px;
  flex: 1 1 240px;
  letter-spacing: .08em;
  padding: 15px 17px;
  text-transform: uppercase;
}

.trip-lookup-row input:focus-visible {
  border-color: var(--iron);
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.trip-lookup-row .button {
  flex: 0 0 auto;
}

.trip-feedback {
  color: #a3322a;
  font-size: 14px;
  margin: 14px 0 0;
  min-height: 20px;
}

.trip-help {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  margin: 28px 0 0;
  padding-top: 20px;
}

.trip-help a {
  color: var(--iron);
  font-weight: 600;
  text-decoration: underline;
}

/* ---------- Loaded booking ---------- */

.trip-detail-top {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 26px;
}

.trip-ref {
  font-family: var(--serif);
  font-size: clamp(28px, 4.4vw, 42px);
  letter-spacing: .02em;
  margin: 6px 0 0;
  word-break: break-all;
}

.trip-detail-actions {
  display: flex;
  gap: 10px;
}

.trip-status {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--muted);
  border-radius: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 26px;
  padding: 22px 26px;
}

.trip-status > div:first-of-type {
  flex: 1 1 260px;
}

.trip-status strong {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
}

.trip-status p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.trip-status-dot {
  background: var(--muted);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(105, 117, 114, .14);
  flex: 0 0 auto;
  height: 11px;
  width: 11px;
}

.trip-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trip-pill {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 7px 14px;
  white-space: nowrap;
}

/* Status tones. Each sets the rail, the dot and its halo together. */
.trip-status[data-tone="good"] { border-left-color: #2f7d5c; }
.trip-status[data-tone="good"] .trip-status-dot { background: #2f7d5c; box-shadow: 0 0 0 6px rgba(47, 125, 92, .16); }
.trip-status[data-tone="wait"] { border-left-color: var(--gold); }
.trip-status[data-tone="wait"] .trip-status-dot { background: var(--gold); box-shadow: 0 0 0 6px rgba(212, 170, 103, .22); }
.trip-status[data-tone="action"] { border-left-color: #c2762a; }
.trip-status[data-tone="action"] .trip-status-dot { background: #c2762a; box-shadow: 0 0 0 6px rgba(194, 118, 42, .18); }
.trip-status[data-tone="stop"] { border-left-color: #a3322a; }
.trip-status[data-tone="stop"] .trip-status-dot { background: #a3322a; box-shadow: 0 0 0 6px rgba(163, 50, 42, .16); }

.trip-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trip-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(22px, 3vw, 30px);
}

.trip-card h2 {
  font-family: var(--serif);
  font-size: 21px;
  margin: 0 0 20px;
}

.trip-card-stay,
.trip-card-payment {
  grid-column: span 1;
}

/* ---------- Stay ---------- */

.trip-stay-dates {
  align-items: center;
  background: var(--ivory);
  border-radius: 16px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 20px;
}

.trip-date {
  flex: 1 1 0;
  min-width: 0;
}

.trip-date small {
  color: var(--muted);
  display: block;
  font-size:12px;
  font-weight: 600;
  letter-spacing: .12em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.trip-date strong {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.2;
}

.trip-date span {
  color: var(--muted);
  font-size: 13px;
}

.trip-date-arrow {
  color: var(--muted);
  flex: 0 0 auto;
  text-align: center;
}

.trip-date-arrow svg {
  height: 20px;
  stroke-width: 1.6;
  width: 20px;
}

.trip-date-arrow small {
  display: block;
  font-size:12px;
  font-weight: 600;
  letter-spacing: .06em;
  white-space: nowrap;
}

.trip-facts,
.trip-bank dl {
  display: grid;
  gap: 1px;
  margin: 0;
}

.trip-facts > div,
.trip-bank dl > div {
  align-items: baseline;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 12px 0;
}

.trip-facts dt,
.trip-bank dt {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.trip-facts dd,
.trip-bank dd {
  font-weight: 600;
  margin: 0;
  text-align: right;
}

/* ---------- Payment ---------- */

.trip-total {
  align-items: baseline;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.trip-total span {
  color: var(--muted);
  font-size: 14px;
}

.trip-total strong {
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 34px);
}

.trip-amount-due {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 22px;
}

.trip-bank {
  background: var(--ivory);
  border-radius: 16px;
  padding: 20px;
}

.trip-bank-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.trip-bank dl > div:first-child {
  border-top: 0;
}

.trip-bank dd {
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.trip-bank-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 14px 0 18px;
}

.trip-wa-pay {
  display: block;
  text-align: center;
}

/* ---------- Arrival and host ---------- */

.trip-map {
  background: var(--ivory);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  padding-top: 62%;
  position: relative;
}

.trip-map iframe {
  border: 0;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

.trip-address {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 18px;
}

.trip-arrival-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trip-card-host p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 20px;
}

.trip-contact-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.trip-contact-list li {
  align-items: center;
  display: flex;
  gap: 13px;
}

.trip-contact-list a {
  font-weight: 600;
}

.trip-contact-list a:hover {
  text-decoration: underline;
}

.trip-contact-icon {
  align-items: center;
  background: var(--iron);
  border-radius: 50%;
  color: var(--gold-light);
  display: flex;
  flex: 0 0 auto;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.trip-contact-icon svg {
  height: 18px;
  width: 18px;
}

.trip-host-note {
  border-top: 1px solid var(--line);
  font-size: 13px;
  padding-top: 18px;
}

.trip-footer {
  align-items: center;
  background: var(--iron-deep);
  color: var(--white);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  padding: 30px clamp(20px, 5vw, 76px);
}

.trip-footer .copyright {
  color: rgba(255, 255, 255, .62);
  font-size: 13px;
  letter-spacing: .04em;
}

/* ---------- Busy state ---------- */

.trip-lookup-form[aria-busy="true"] #trip-submit {
  opacity: .62;
  pointer-events: none;
}

@media (max-width: 860px) {
  .trip-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .trip-header {
    gap: 14px;
  }

  .trip-nav > a:first-child {
    display: none;
  }

  .trip-stay-dates {
    flex-direction: column;
    gap: 18px;
  }

  .trip-date-arrow svg {
    transform: rotate(90deg);
  }

  .trip-detail-actions {
    width: 100%;
  }

  .trip-detail-actions .button {
    flex: 1 1 0;
  }
}

/* ===== Same look as the host dashboard: night header, warm sand page, white panels with a top rule
   in the colour of their subject (emerald = the stay, deep blue = payment, gold = arrival). ===== */
.trip-body {
  --admin-page: #f3efe7;
  --admin-line: rgba(32, 33, 36, .1);
  --tone-today: #1f5c48;
  --tone-today-tint: #e6f1ec;
  --tone-booking: #b88a2a;
  --tone-booking-text: #7d5a13;
  --tone-booking-tint: #f7eedb;
  --tone-pay: #2b4c7e;
  --tone-pay-tint: #e5ecf6;
  --tone-alert: #a33b34;
  background: var(--admin-page);
}

.trip-header {
  background: var(--iron-deep);
  border-bottom: 0;
  color: var(--white);
  padding: 10px clamp(16px, 4vw, 40px);
}

.trip-header .brand small {
  color: var(--gold-light);
}

.trip-nav > a:first-child {
  color: rgba(255, 255, 255, .78);
}

.trip-nav .button-dark {
  background: var(--gold);
  color: var(--iron-deep);
}

@media (hover: hover) {
  .trip-nav > a:first-child:hover {
    color: var(--white);
  }

  .trip-nav .button-dark:hover {
    background: var(--gold-light);
    color: var(--iron-deep);
  }
}

.trip-main {
  max-width: 1080px;
  padding: 20px clamp(16px, 4vw, 40px) 48px;
}

.trip-main .eyebrow {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Lookup: one panel, gold rule as on the dashboard's bookings panel. */
.trip-lookup {
  border: 1px solid var(--admin-line);
  border-radius: var(--radius);
  border-top: 3px solid var(--tone-booking);
  box-shadow: none;
  margin-top: 12px;
  padding: clamp(18px, 3vw, 28px);
}

.trip-lookup .eyebrow {
  color: var(--tone-booking-text);
}

.trip-lookup h1 {
  font-size: clamp(26px, 3vw, 34px);
  margin-bottom: 8px;
}

.trip-lookup-copy {
  font-size: 15px;
  margin-bottom: 18px;
}

.trip-lookup-form label {
  color: var(--muted);
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.trip-lookup-row input {
  background: var(--white);
  border-color: var(--admin-line);
  border-radius: var(--radius-sm);
  font-size: 16px;
  min-height: 46px;
  padding: 10px 14px;
}

.trip-lookup-row input:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 138, 42, .16);
  outline: 0;
}

.trip-lookup-row .button {
  min-height: 46px;
}

.trip-feedback:empty {
  margin: 0;
  min-height: 0;
}

.trip-help {
  border-top-color: var(--admin-line);
  margin-top: 16px;
  padding-top: 14px;
}

/* Loaded booking */
.trip-detail-top {
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.trip-detail-top .eyebrow {
  color: var(--tone-booking-text);
}

.trip-ref {
  font-size: clamp(22px, 2.6vw, 30px);
  margin-top: 2px;
}

.trip-detail-actions .button {
  font-size: 13px;
  min-height: 36px;
  padding: 0 16px;
}

.trip-status {
  border: 1px solid var(--admin-line);
  border-left: 4px solid var(--muted);
  border-radius: var(--radius);
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 18px;
}

.trip-status strong {
  font-size: 17px;
  margin-bottom: 2px;
}

.trip-status[data-tone="good"] { border-left-color: var(--tone-today); }
.trip-status[data-tone="good"] .trip-status-dot { background: var(--tone-today); box-shadow: 0 0 0 5px var(--tone-today-tint); }
.trip-status[data-tone="wait"] { border-left-color: var(--tone-booking); }
.trip-status[data-tone="wait"] .trip-status-dot { background: var(--tone-booking); box-shadow: 0 0 0 5px var(--tone-booking-tint); }
.trip-status[data-tone="action"] { border-left-color: var(--tone-pay); }
.trip-status[data-tone="action"] .trip-status-dot { background: var(--tone-pay); box-shadow: 0 0 0 5px var(--tone-pay-tint); }
.trip-status[data-tone="stop"] { border-left-color: var(--tone-alert); }
.trip-status[data-tone="stop"] .trip-status-dot { background: var(--tone-alert); box-shadow: 0 0 0 5px #f6e3e0; }

.trip-pill {
  background: var(--admin-page);
  border-color: transparent;
  font-size: 12px;
  padding: 5px 12px;
}

.trip-grid {
  gap: 14px;
}

.trip-card {
  --tone: var(--ink);
  border: 1px solid var(--admin-line);
  border-radius: var(--radius);
  border-top: 3px solid var(--tone);
  padding: clamp(16px, 2vw, 22px);
}

.trip-card h2 {
  font-size: 20px;
  margin-bottom: 14px;
}

.trip-card-stay { --tone: var(--tone-today); }
.trip-card-payment { --tone: var(--tone-pay); }
.trip-card-arrival { --tone: var(--tone-booking); }
.trip-card-host { --tone: var(--muted); }

/* Inner boxes take a tint of their card's colour. */
.trip-stay-dates {
  background: var(--tone-today-tint);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  padding: 14px 16px;
}

.trip-date strong {
  color: var(--tone-today);
}

.trip-date-arrow {
  color: var(--tone-today);
}

.trip-facts > div,
.trip-bank dl > div {
  border-top-color: var(--admin-line);
  padding: 9px 0;
}

.trip-total strong {
  color: var(--tone-pay);
  font-size: clamp(24px, 2.8vw, 30px);
}

.trip-amount-due {
  margin-bottom: 14px;
}

.trip-bank {
  background: var(--tone-pay-tint);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.trip-bank-title {
  color: var(--tone-pay);
  letter-spacing: .06em;
}

.trip-bank dd {
  color: var(--tone-pay);
}

.trip-bank dl > div {
  border-top-color: rgba(43, 76, 126, .14);
}

.trip-bank-note {
  margin: 10px 0 12px;
}

.trip-map {
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.trip-address {
  margin-bottom: 12px;
}

.trip-card-host p {
  margin-bottom: 14px;
}

.trip-contact-list {
  gap: 8px;
  margin-bottom: 14px;
}

.trip-host-note {
  padding-top: 12px;
}

.trip-footer {
  padding: 20px clamp(16px, 4vw, 40px) calc(20px + env(safe-area-inset-bottom));
}

@media (max-width: 560px) {
  .trip-header .button {
    font-size: 13px;
    min-height: 34px;
    padding: 0 12px;
  }

  .trip-stay-dates {
    gap: 10px;
  }

  .trip-status-pills {
    width: 100%;
  }

  /* Check-in, nights and check-out stay on one line, as on the dashboard; only very narrow screens stack. */
  .trip-stay-dates {
    flex-direction: row;
  }

  .trip-date-arrow svg {
    transform: none;
  }

  .trip-date strong {
    font-size: 17px;
  }
}

@media (max-width: 360px) {
  .trip-stay-dates {
    flex-direction: column;
  }

  .trip-date-arrow svg {
    transform: rotate(90deg);
  }
}

/* ---------- Terms and Privacy pages ---------- */
.legal {
  background: var(--white);
  border: 1px solid var(--admin-line);
  border-radius: var(--radius);
  margin: 12px auto 0;
  max-width: 800px;
  padding: clamp(20px, 4vw, 44px);
}

.legal .eyebrow {
  color: var(--tone-booking-text);
}

.legal h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.1;
  margin: 0;
}

.legal-updated {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 16px;
}

.legal-intro {
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 18px;
}

.legal a:not(.button) {
  color: var(--tone-booking-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Jump links to each section. */
.legal-contents {
  background: var(--admin-page);
  border-radius: var(--radius-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-bottom: 8px;
  padding: 10px 12px;
}

.legal .legal-contents a {
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  text-decoration: none;
}

.legal section {
  border-top: 1px solid var(--admin-line);
  margin-top: 22px;
  padding-top: 18px;
  scroll-margin-top: 16px;
}

.legal h2 {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 10px;
}

.legal p,
.legal li {
  font-size: 15px;
  line-height: 1.7;
  max-width: 68ch;
}

.legal p {
  margin: 0 0 10px;
}

.legal ul {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
  padding-left: 20px;
}

.legal li::marker {
  color: var(--tone-booking);
}

/* Refund tiers and house rules read as a short checklist. */
.legal .legal-tiers,
.legal .legal-rules {
  list-style: none;
  padding: 0;
}

.legal-tiers li,
.legal-rules li {
  background: var(--admin-page);
  border-left: 3px solid var(--tone-booking);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 8px 12px;
}

.legal-tiers li:first-child {
  border-left-color: var(--tone-today);
}

.legal-tiers li:last-child {
  border-left-color: var(--tone-alert);
}

.trip-footer-links {
  display: flex;
  gap: 18px;
}

.trip-footer-links a {
  color: rgba(255, 255, 255, .86);
  font-size: 14px;
  padding: 8px 0;
}

.trip-footer-links a[aria-current="page"] {
  color: var(--gold-light);
}

@media (hover: hover) {
  .legal .legal-contents a:hover {
    background: var(--white);
    color: var(--tone-booking-text);
  }

  .trip-footer-links a:hover {
    color: var(--white);
  }
}

.not-found {
  text-align: center;
}

.not-found h1 {
  margin-bottom: 12px;
}

.not-found .legal-intro {
  margin-left: auto;
  margin-right: auto;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

@media print {
  .trip-header,
  .trip-footer,
  .trip-detail-actions,
  .trip-map,
  .trip-arrival-actions,
  .trip-wa-pay,
  .trip-lookup {
    display: none;
  }

  .trip-body {
    background: #fff;
  }

  .trip-card,
  .trip-status {
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
  }

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