/* TastyHouse "Choose your location" on the website (TastyHouse Mobile API 1.9.0).
   The app's location screen, drawn with the theme's own tokens (prototype.css :root). */

html.thm-loc-open { overflow: hidden; }

.thm-loc { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; }
.thm-loc[hidden] { display: none; }
.thm-loc-backdrop { position: absolute; inset: 0; background: rgba(20, 14, 8, .45); }
.thm-loc-sheet {
  position: relative; display: flex; flex-direction: column; width: min(560px, calc(100vw - 32px)); max-height: min(860px, calc(100vh - 48px));
  background: var(--bg, #FBF7F2); border-radius: var(--r-xl, 22px); box-shadow: var(--shadow-lg, 0 24px 60px rgba(0,0,0,.25)); overflow: hidden;
  font-family: var(--font-body, system-ui, sans-serif); color: var(--ink, #1E1E1E);
}
@media (max-width: 640px) {
  .thm-loc { align-items: stretch; }
  .thm-loc-sheet { width: 100%; max-height: none; height: 100%; border-radius: 0; }
}

.thm-loc-head { display: flex; align-items: center; gap: 14px; padding: 18px 18px 10px; }
.thm-loc-head h2 { margin: 0; font-family: var(--font-display, inherit); font-size: 22px; line-height: 1.15; letter-spacing: -.02em; color: var(--ink, #1E1E1E); }
.thm-loc-head p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2, #4a4a4a); }
.thm-loc-x {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line, #ECE6DE); background: var(--surface, #fff);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink, #1E1E1E); cursor: pointer;
}

.thm-loc-body { flex: 1; overflow-y: auto; padding: 4px 18px 18px; -webkit-overflow-scrolling: touch; }
.thm-loc-main { display: flex; flex-direction: column; gap: 12px; }

.thm-loc-search {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; margin: 0 0 14px;
  border: 1px solid var(--line-2, #E2DACF); border-radius: var(--r-pill, 999px); background: var(--bg-2, #F1EBE3); color: var(--ink-3, #7a7a7a);
}
.thm-loc-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15.5px; color: var(--ink, #1E1E1E); }
.thm-loc-search input::-webkit-search-cancel-button { display: none; }
.thm-loc-qx { border: 0; background: none; padding: 4px; color: var(--ink-3, #7a7a7a); cursor: pointer; display: inline-flex; }
.thm-loc-qx[hidden] { display: none; }

/* Big option cards (current location, all locations, countries, find on map) */
.thm-loc-card {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; text-align: left; cursor: pointer; font: inherit;
  border: 1px solid var(--line, #ECE6DE); border-radius: var(--r-lg, 18px); background: var(--surface, #fff); color: inherit;
  transition: border-color .15s, background .15s;
}
.thm-loc-card:hover { border-color: var(--primary, #F26A1B); }
.thm-loc-card.on { border-color: var(--primary, #F26A1B); background: var(--primary-soft, #FDEBDC); }
.thm-loc-card.busy { opacity: .6; pointer-events: none; }
.thm-loc-disc {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; background: var(--primary, #F26A1B); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.thm-loc-card-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.thm-loc-card-t b { font-size: 16px; font-weight: 700; color: var(--ink, #1E1E1E); }
.thm-loc-card-t span { font-size: 13.5px; color: var(--ink-2, #4a4a4a); }
.thm-loc-chev { color: var(--ink-3, #7a7a7a); display: inline-flex; }
.thm-loc-tick {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--primary, #F26A1B); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.thm-loc-flag { font-size: 28px; line-height: 1; }
.thm-loc-card .thm-loc-disc:has(.thm-loc-flag) { background: var(--bg-2, #F1EBE3); }
.thm-loc-flag.big { font-size: 30px; }

/* Section headings */
.thm-loc-h { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-family: var(--font-display, inherit); font-size: 19px; letter-spacing: -.01em; color: var(--ink, #1E1E1E); }
.thm-loc-h svg { color: var(--primary, #F26A1B); flex-shrink: 0; }
.thm-loc-mini { margin: 10px 0 0; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3, #7a7a7a); }

/* Quick location chips */
.thm-loc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.thm-loc-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 600;
  border: 1px solid var(--line-2, #E2DACF); border-radius: var(--r-pill, 999px); background: var(--surface, #fff); color: var(--ink, #1E1E1E);
}
.thm-loc-chip svg { color: var(--primary, #F26A1B); }
.thm-loc-chip.on { background: var(--primary, #F26A1B); border-color: var(--primary, #F26A1B); color: #fff; }
.thm-loc-chip.on svg { color: #fff; }

/* State / area rows */
.thm-loc-row { display: flex; align-items: center; border-bottom: 1px solid var(--line, #ECE6DE); }
.thm-loc-row-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; text-align: left;
  border: 0; background: none; cursor: pointer; font: inherit; color: inherit;
}
.thm-loc-pin {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft, #FDEBDC); color: var(--primary, #F26A1B);
  display: inline-flex; align-items: center; justify-content: center;
}
.thm-loc-row.on .thm-loc-pin { background: var(--primary, #F26A1B); color: #fff; }
.thm-loc-lead { width: 34px; text-align: center; font-size: 24px; flex-shrink: 0; }
.thm-loc-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.thm-loc-row-t b { font-size: 15px; font-weight: 600; color: var(--ink, #1E1E1E); }
.thm-loc-row.on .thm-loc-row-t b { color: var(--primary, #F26A1B); font-weight: 700; }
.thm-loc-row-t span { font-size: 13px; color: var(--ink-3, #7a7a7a); }
.thm-loc-ok { color: var(--primary, #F26A1B); display: inline-flex; }
.thm-loc-more { border: 0; background: none; padding: 14px 10px; color: var(--ink-3, #7a7a7a); cursor: pointer; display: inline-flex; }
.thm-loc-areas { padding-left: 22px; background: var(--surface-2, #F8F4EE); border-radius: var(--r, 13px); }

.thm-loc-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; color: var(--primary-700, #B94B0B); }
.thm-loc-country { display: flex; align-items: center; gap: 10px; }
.thm-loc-country h3 { margin: 0; font-family: var(--font-display, inherit); font-size: 22px; color: var(--ink, #1E1E1E); }

/* The chosen point: map + radius */
.thm-loc-near { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--primary, #F26A1B); border-radius: var(--r-lg, 18px); background: var(--surface, #fff); }
.thm-loc-near-h { display: flex; flex-direction: column; gap: 2px; }
.thm-loc-near-h b { font-size: 16px; }
.thm-loc-near-h span { font-size: 13.5px; color: var(--ink-2, #4a4a4a); }
.thm-loc-map { height: 200px; border-radius: var(--r, 13px); overflow: hidden; background: var(--bg-2, #F1EBE3); z-index: 0; }
.thm-loc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.thm-loc-pill {
  padding: 9px 16px; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 600;
  border: 1px solid var(--line-2, #E2DACF); border-radius: var(--r-pill, 999px); background: var(--surface, #fff); color: var(--ink, #1E1E1E);
}
.thm-loc-pill.on { background: var(--primary, #F26A1B); border-color: var(--primary, #F26A1B); color: #fff; }
.thm-loc-note { margin: 0; padding: 10px 12px; font-size: 13px; color: var(--ink-2, #4a4a4a); background: var(--bg-2, #F1EBE3); border-radius: var(--r, 13px); }

/* Footer: selected location + Apply / Clear */
.thm-loc-foot { display: flex; flex-direction: column; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line, #ECE6DE); background: var(--bg, #FBF7F2); }
.thm-loc-sel { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line, #ECE6DE); border-radius: var(--r-lg, 18px); background: var(--surface, #fff); }
.thm-loc-dot {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--primary-soft, #FDEBDC); color: var(--primary, #F26A1B);
  display: inline-flex; align-items: center; justify-content: center;
}
.thm-loc-sel-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.thm-loc-sel-t b { font-size: 14.5px; }
.thm-loc-sel-t span { font-size: 14px; color: var(--ink-2, #4a4a4a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thm-loc-badge {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: var(--r-pill, 999px);
  background: var(--secondary-soft, #E3F1ED); color: var(--secondary-700, #0A5849); font-size: 13px; font-weight: 600;
}
.thm-loc-apply { width: 100%; justify-content: center; }
.thm-loc-apply.busy { opacity: .7; pointer-events: none; }
.thm-loc-clear { align-self: center; padding: 4px; border: 0; background: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2, #4a4a4a); text-decoration: underline; }

/* Waiting / messages / toast */
.thm-loc-wait { display: flex; justify-content: center; gap: 6px; padding: 40px 0; }
.thm-loc-wait.small { padding: 16px 0; }
.thm-loc-wait span { width: 8px; height: 8px; border-radius: 50%; background: var(--primary, #F26A1B); animation: thm-loc-dot 1s infinite ease-in-out; }
.thm-loc-wait span:nth-child(2) { animation-delay: .15s; }
.thm-loc-wait span:nth-child(3) { animation-delay: .3s; }
@keyframes thm-loc-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.thm-loc-msg { margin: 16px 0; text-align: center; color: var(--ink-2, #4a4a4a); }
.thm-loc-msg.small { margin: 10px; font-size: 13px; text-align: left; }
.thm-loc-link { border: 0; background: none; padding: 0; font: inherit; color: var(--primary-700, #B94B0B); text-decoration: underline; cursor: pointer; }
.thm-loc-toast {
  position: absolute; left: 18px; right: 18px; bottom: 170px; padding: 12px 14px; border-radius: var(--r, 13px);
  background: var(--ink, #1E1E1E); color: #fff; font-size: 14px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.thm-loc-toast.show { opacity: 1; transform: none; }
