@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #f6f4ef;
  --panel: rgba(255, 255, 255, 0.92);
  --card: #f1f4f2;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0f766e;
  --accent-ink: #ecfdf3;
  --line: rgba(15, 23, 42, 0.1);
  --shadow: 0 28px 60px rgba(15, 23, 42, 0.12);
  --tg-viewport-stable-width: 100vw;
  --tg-map-expanded-width: 100vw;
  --tg-map-expanded-height: 100vh;
  --map-expanded-top-offset: 0px;
  --map-expanded-extra-bottom-offset: 0px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(900px 480px at 10% -10%, rgba(15, 118, 110, 0.18), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(249, 115, 22, 0.16), transparent 60%),
    #f6f4ef;
  color: var(--text);
}

body.map-expanded {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  position: fixed;
  inset: 0;
}

body.map-expanded .app,
html.map-expanded .app {
  visibility: hidden;
  pointer-events: none;
}

body.map-expanded .map-wrap.is-expanded,
body.map-expanded .map-overlay,
html.map-expanded .map-wrap.is-expanded,
html.map-expanded .map-overlay {
  visibility: visible;
  pointer-events: auto;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}

/* Compact layout when the web app is embedded into the public landing page. */
html.is-embedded .app {
  max-width: none;
  margin: 0;
  padding: 24px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

html.is-embedded .hero {
  margin-bottom: 12px;
}

.eyebrow {
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 8px;
}

.hero h1 {
  margin: 0;
  font-size: 38px;
}

html.is-embedded .hero h1 {
  font-size: 30px;
}

html.is-embedded .subhead {
  display: none;
}

.subhead {
  color: var(--muted);
  margin: 8px 0 0;
}

.badge {
  background: #ffffff;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}

.panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  background: var(--panel);
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  overflow: visible;
}

.panel,
.form,
.field {
  min-width: 0;
}

html.is-embedded .panel {
  padding: 24px;
}

.form {
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 2;
  overflow: visible;
}

html.is-embedded .form {
  gap: 14px;
}

.field {
  border-bottom: 0;
  padding-bottom: 0;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.field-pair {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.field--pickup,
.field--dropoff,
.field-pair--schedule,
.field--referral,
.field--price-match-toggle {
  margin-top: 8px;
}

.field[hidden] {
  display: none !important;
}

.field.has-results,
.field.is-select-open {
  z-index: 11000;
}

.field>label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

html.is-embedded .field>label {
  margin-bottom: 4px;
}

.service-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.service-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.service-chip.is-active {
  border-color: rgba(15, 118, 110, 0.6);
  background: rgba(15, 118, 110, 0.1);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.field-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.field-row>* {
  min-width: 0;
}

.price-match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 220px);
  align-items: stretch;
  gap: 10px;
}

.price-match-company-slot,
.price-match-value-slot {
  min-width: 0;
  width: 100%;
}

.price-match-row .select,
.price-match-row select,
.price-match-row input[type='number'] {
  width: 100%;
  min-width: 0;
}

@media (max-width: 640px) {
  .price-match-row {
    grid-template-columns: 1fr;
  }
}

.time-row {
  flex-direction: column;
  align-items: stretch;
  margin-top: 8px;
  gap: 10px;
}

.time-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.time-options.booking-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field-pair--schedule .time-options .choice {
  border-radius: 14px;
  min-height: 48px;
}

.time-options.booking-options .choice {
  white-space: normal;
  min-width: 0;
  align-items: center;
  border-radius: 16px;
  min-height: 52px;
  padding: 12px 16px;
}

.time-options.booking-options .choice-label {
  white-space: normal;
  line-height: 1.25;
}

.reservation-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  align-items: flex-start;
}

.field .choice {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 46px;
  padding: 10px 18px;
  min-width: 0;
  flex: 1 1 0;
  flex-direction: row;
  flex-wrap: nowrap;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  line-height: 1.1;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

@supports selector(.time-row:has(input:checked)) {
  .reservation-row {
    display: none;
  }

  .time-row:has(input[value='reservation']:checked) .reservation-row {
    display: flex;
  }
}

.choice input[type='radio'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  margin: 0;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: none;
}

.choice-indicator {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.25);
  background: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  align-self: center;
}

.choice-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.12s ease;
}

.choice input[type='radio']:checked+.choice-indicator::after {
  transform: scale(1);
}

.choice-label {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  white-space: nowrap;
}

#reservation-date,
#reservation-time {
  width: 100%;
  height: 46px;
  flex: 0 0 auto;
  padding: 10px 42px 10px 14px;
  line-height: 1.2;
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}

#reservation-date {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='2.5' y='3.5' width='11' height='10' rx='2'/><path d='M5 2.5v2M11 2.5v2M2.5 6h11'/></svg>");
}

#reservation-time {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><circle cx='8' cy='8' r='6.5'/><path d='M8 4.5v3.8l2.8 1.6'/></svg>");
}

#reservation-date::-webkit-calendar-picker-indicator,
#reservation-time::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  right: 14px;
  cursor: pointer;
}

#reservation-date::-webkit-inner-spin-button,
#reservation-time::-webkit-inner-spin-button {
  display: none;
}

@media (max-width: 520px) {

  #reservation-date,
  #reservation-time {
    flex-basis: 100%;
  }
}

#reservation-date.is-hidden,
#reservation-time.is-hidden {
  display: none;
}

#reservation-date.is-invalid,
#reservation-time.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.reservation-field {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.reservation-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* Removed ghost placeholders for date/time to avoid overlaying real values. */

.time-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.time-suggestions:empty {
  display: none;
}

.time-suggestions button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.time-suggestions button.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.reservation-field.is-hidden {
  display: none;
}

@supports selector(.choice:has(input:checked)) {
  .choice:has(input:checked) {
    border-color: rgba(15, 118, 110, 0.6);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  }
}

.clear-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
}

.clear-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

input[type='text'],
input[type='date'],
input[type='time'],
input[type='email'],
input[type='tel'],
input[type='number'] {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  background-image: none;
  appearance: none;
  -webkit-appearance: none;
}

input[type='radio'] {
  flex: 0 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

input[type='date'],
input[type='time'] {
  min-height: 40px;
}

input[type='number'] {
  -moz-appearance: textfield;
}

input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid var(--line);
  background: #fff;
  display: inline-grid;
  place-items: center;
  margin: 0;
  box-shadow: 0 0 0 0 rgba(15, 118, 110, 0);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.checkbox-label input[type='checkbox']::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.15s ease;
}

.checkbox-label input[type='checkbox']:checked::after {
  transform: scale(1);
}

.checkbox-label input[type='checkbox']:focus-visible {
  border-color: rgba(15, 118, 110, 0.6);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

select {
  flex: 1;
  width: 100%;
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
  position: relative;
  z-index: 3;
}

.select-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 0;
  width: 0;
}

.select {
  position: relative;
  width: 100%;
}

.select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.select.is-disabled .select-trigger {
  opacity: 0.6;
  cursor: not-allowed;
}

.select-label {
  text-align: left;
  flex: 1;
  min-width: 0;
}

.select-caret {
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 5l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  flex: 0 0 auto;
}

.select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  z-index: 12000;
  display: none;
  max-height: 168px;
  overflow: auto;
  padding: 6px 0;
}

.select.is-open {
  z-index: 12000;
}

.select.is-open .select-menu {
  display: block;
}

.select-option {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
}

.select-option:hover {
  background: rgba(15, 118, 110, 0.08);
}

.select-option.is-selected {
  background: rgba(15, 118, 110, 0.14);
  font-weight: 600;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.6);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

input::placeholder {
  color: var(--muted);
}

.results {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 12000;
}

.results[hidden] {
  display: none;
}

.results:empty {
  display: none;
}

.results li {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  transition: background 0.2s ease;
}

.results li:last-child {
  border-bottom: none;
}

.results li:hover {
  background: rgba(15, 118, 110, 0.08);
}

.summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  background: var(--card);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.summary span {
  color: var(--muted);
  font-size: 11px;
}

.summary strong {
  font-size: 16px;
}

.fleet-rates {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.fare-breakdown {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.fleet-rates-title {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.fare-breakdown-title {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.fleet-rates-list {
  display: grid;
  gap: 6px;
}

.fare-breakdown-list {
  display: grid;
  gap: 6px;
}

.fleet-rate-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.fare-breakdown-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.fare-breakdown-item.total {
  font-weight: 700;
}

.fleet-rate-meta {
  color: var(--muted);
  font-size: 11px;
}

.fleet-rate-price {
  font-weight: 700;
  color: var(--accent);
}

.breakdown {
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}

.compare {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  min-height: 18px;
}

.breakdown:empty,
.compare:empty,
.status:empty {
  display: none;
}

.primary {
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(120deg, var(--accent), #14b8a6);
  color: var(--accent-ink);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary:not(.map-done):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 18px rgba(15, 118, 110, 0.2);
}

.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.ghost {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.pin-btn {
  width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.pin-btn.is-active {
  border-color: rgba(15, 118, 110, 0.6);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.ghost:hover {
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 10px 16px rgba(15, 23, 42, 0.1);
}

.status {
  font-size: 13px;
  color: var(--muted);
}

.handoff {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.handoff-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.handoff-actions {
  display: grid;
  gap: 8px;
}

.build-tag {
  margin: 0;
  font-size: 11px;
  color: rgba(100, 116, 139, 0.7);
  text-align: right;
}

.status.is-error {
  color: #dc2626;
  font-weight: 600;
}

.status.is-warning {
  color: #d97706;
  font-weight: 600;
}

#guest-details {
  display: grid;
  gap: 8px;
}

.guest-details-grid {
  display: grid;
  gap: 10px;
}

.map-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.096);
  z-index: 0;
  background: #f6f4ef;
}

.map-overlay {
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
  z-index: 9998;
}

body.map-expanded .map-overlay,
html.map-expanded .map-overlay {
  opacity: 1;
  pointer-events: auto;
  z-index: 10005;
}

.map-wrap.inline {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 300px;
  margin-block: 20px;
}

html.is-embedded .map-wrap.inline {
  aspect-ratio: 16 / 9;
}

.map-dismiss {
  display: none;
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 12px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(148, 163, 184, 0.48);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 10040;
}

.map-dismiss:hover {
  transform: translateY(-1px);
}

.map-dismiss:active {
  transform: translateY(0);
}

.map-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  font-size: 28px;
  line-height: 1;
  pointer-events: auto;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  filter: drop-shadow(0 6px 12px rgba(15, 23, 42, 0.22));
  opacity: 1;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10020;
}

.map-pin-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  display: inline-block;
}

.map-wrap.is-pinning .map-pin {
  transform: translate(-50%, -110%);
}

.map-wrap.is-dragging .map-pin {
  transform: translate(-50%, -120%);
}

.map-wrap.is-locked .map-pin {
  opacity: 0.75;
}

.map-wrap.is-editing .map-pin {
  transform: translate(-50%, -150%) scale(1.08);
  filter: drop-shadow(0 12px 18px rgba(15, 23, 42, 0.28));
}

#map {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
}

body.map-expanded {
  overflow: hidden;
  position: fixed;
  inset: 0;
}

.map-wrap.is-expanded {
  position: fixed !important;
  inset: auto !important;
  left: 0 !important;
  top: var(--map-expanded-top-offset, 0px) !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: var(--tg-map-expanded-width, var(--tg-viewport-stable-width, 100vw)) !important;
  height: var(--tg-map-expanded-height, var(--tg-viewport-stable-height, 100vh)) !important;
  margin: 0 !important;
  border-radius: 0 !important;
  z-index: 10010;
  box-shadow: none !important;
  background: #f6f4ef;
  max-height: var(--tg-map-expanded-height, var(--tg-viewport-stable-height, 100vh)) !important;
  max-width: var(--tg-map-expanded-width, var(--tg-viewport-stable-width, 100vw)) !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
}

html.is-embedded .map-wrap.inline.is-expanded {
  aspect-ratio: auto !important;
  max-height: var(--tg-map-expanded-height, var(--tg-viewport-stable-height, 100vh)) !important;
  max-width: var(--tg-map-expanded-width, var(--tg-viewport-stable-width, 100vw)) !important;
  width: var(--tg-map-expanded-width, var(--tg-viewport-stable-width, 100vw)) !important;
  height: var(--tg-map-expanded-height, var(--tg-viewport-stable-height, 100vh)) !important;
  border-radius: 0 !important;
}

html.is-tg .map-wrap.is-expanded {
  width: var(--tg-map-expanded-width, var(--tg-viewport-stable-width, 100vw)) !important;
  height: var(--tg-map-expanded-height, var(--tg-viewport-stable-height, 100vh)) !important;
  top: var(--map-expanded-top-offset, 0px) !important;
}

.map-wrap.is-expanded #map {
  height: 100% !important;
  width: 100% !important;
  margin-top: 0;
}

.map-wrap.is-expanded .map-expand {
  display: none;
}

.map-wrap.is-expanded .map-dismiss {
  display: inline-flex;
}

.map-wrap.is-expanded .map-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom, 0px) + var(--map-expanded-extra-bottom-offset, 0px));
  z-index: 10042;
  min-width: 132px;
}

.map-wrap.is-expanded .map-hint {
  left: 12px;
  right: 12px;
  bottom: calc(70px + env(safe-area-inset-bottom, 0px) + var(--map-expanded-extra-bottom-offset, 0px));
  z-index: 10036;
}

.map-wrap.is-expanded .locate-btn {
  right: 14px;
  bottom: calc(70px + env(safe-area-inset-bottom, 0px) + var(--map-expanded-extra-bottom-offset, 0px));
  z-index: 10041;
}

@media (max-width: 980px) {
  .map-wrap.is-expanded {
    width: var(--tg-map-expanded-width, 100dvw);
    height: var(--tg-map-expanded-height, 100dvh);
    top: var(--map-expanded-top-offset, 0px) !important;
    border-radius: 0;
    box-shadow: none;
  }

  .map-wrap.is-expanded .map-hint {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + var(--map-expanded-extra-bottom-offset, 0px));
    left: 12px;
    right: 12px;
  }

  .map-wrap.is-expanded .locate-btn {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + var(--map-expanded-extra-bottom-offset, 0px));
  }

  .map-wrap.is-expanded .map-done {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px) + var(--map-expanded-extra-bottom-offset, 0px));
  }

  .map-wrap.is-expanded .map-dismiss {
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 10px;
  }
}

#guest-otp-field {
  display: grid;
  grid-template-columns: minmax(108px, 1fr) auto auto;
  align-items: stretch;
  gap: 8px;
}

#guest-otp-code {
  width: 100%;
  min-width: 0;
}

#guest-otp-field .ghost {
  white-space: nowrap;
}

.tn-pin-icon {
  position: relative;
  width: 20px;
  height: 20px;
  background: transparent !important;
  border: none !important;
}

.tn-pin-icon__pin {
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.18);
}

.tn-pin-icon__pin::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #0f172a;
  box-shadow: inset 0 0 0 2px #fff;
  top: 6px;
  left: 6px;
  transform: rotate(45deg);
}

.tn-pin-icon--dropoff .tn-pin-icon__pin {
  background: #f97316;
}

.map-hint {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid var(--line);
  z-index: 402;
  max-width: calc(100% - 32px);
}

.form-hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.map-expand {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  z-index: 403;
}

.map-done {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  z-index: 10024;
  display: none;
}

.map-wrap.is-editing .map-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.map-done:hover {
  transform: translateX(-50%) translateY(-1px);
}

.map-done:active {
  transform: translateX(-50%);
}


@media (max-width: 980px) {
  .panel {
    gap: 6px;
  }

  .app {
    padding: 16px;
  }

  .hero h1 {
    font-size: 28px;
  }

  html.is-embedded .map-wrap.inline {
    max-height: 320px;
  }
}

@media (min-width: 981px) {
  .field-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    column-gap: 16px;
  }

  .guest-details-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 520px) {
  .field-pair--roles .time-options.booking-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-pair--roles .time-options.booking-options .choice {
    padding: 10px 12px;
    min-height: 48px;
  }

  #guest-otp-field {
    grid-template-columns: 1fr;
  }

  #guest-otp-field .ghost {
    width: 100%;
  }

  .map-expand {
    top: 12px;
    right: 12px;
  }
}
