/* Directions modal — the look of the user's other app (UGoodFam): warm gold on
   charcoal, tinted header band, one big row per maps app with its logo tile.
   Own file so the landing page, the map page and Anna's page all load the same one. */

/* ── directions: the THREE options — styled after the user's other app ────────
   Same look as UGoodFam: warm gold on charcoal, the tinted header band, one big row
   per maps app with its real logo tile. A lone Google link was the cheap-looking
   thing; this is the shape he asked for, colours included. */
.dir-overlay { position: fixed; inset: 0; z-index: 9000; display: flex;
  align-items: center; justify-content: center; padding: 14px;
  background: rgba(4, 3, 2, .82);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dir-overlay[hidden] { display: none; }
.dir-card { width: min(560px, 100%); max-height: 84vh; overflow: hidden;
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, #1c1710, #120e08);
  border: 1px solid rgba(217, 180, 74, .5); border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .75);
  /* the other app's modal is clean sans, not handwriting */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.dir-head { display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; background: linear-gradient(135deg, rgba(217, 180, 74, .14), rgba(31, 27, 21, .4));
  border-bottom: 1px solid rgba(217, 180, 74, .2); }
.dir-title { display: flex; align-items: center; gap: 9px; color: #d9b44a;
  font-weight: 900; font-size: 16px; letter-spacing: .6px; }
.dir-close { appearance: none; border: none; background: rgba(255, 255, 255, .08);
  color: #f5f0e4; width: 34px; height: 34px; border-radius: 50%; font-size: 16px;
  cursor: pointer; transition: background .2s, transform .1s; }
.dir-close:active { transform: scale(.93); }
.dir-body { overflow-y: auto; flex: 1; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; }
.dir-place { padding: 20px 18px 2px; font-size: 19px; font-weight: 900; color: #fff; }
.dir-addr { padding: 2px 18px 14px; color: #a2967f; font-size: 13px; line-height: 1.5; }
.dir-choices { display: flex; flex-direction: column; gap: 10px; padding: 6px 18px 4px; }
.dir-btn { display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 15px; padding: 13px 15px; color: #f5f0e4;
  transition: background .16s, border-color .16s, transform .1s; }
.dir-btn:hover { background: rgba(217, 180, 74, .09); border-color: rgba(217, 180, 74, .45); }
.dir-btn:active { transform: scale(.98); }
.dir-btn b { display: block; font-size: 15.5px; font-weight: 800; }
.dir-btn small { color: #a2967f; font-size: 12px; }
.dir-btn i { margin-left: auto; color: #d9b44a; font-size: 14px; }
.dir-btn > span:nth-child(2) { flex: 1; }
.dir-logo { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 17px; color: #fff; }
.dir-logo svg { width: 24px; height: 24px; display: block; }
.dir-logo.apple { background: linear-gradient(135deg, #0a0a0a, #333); }
.dir-logo.google { background: linear-gradient(135deg, #4285f4, #34a853); }
.dir-logo.waze { background: linear-gradient(135deg, #33ccff, #0096ff); }
.dir-note { padding: 10px 18px 18px; color: #a2967f; font-size: 11.5px; line-height: 1.5; }

/* the spoken steps, above the three options */
.dir-steps { margin: 4px 18px 8px; padding: 12px 14px; border-radius: 14px;
  background: rgba(217, 180, 74, .07); border: 1px solid rgba(217, 180, 74, .25); }
.dir-steps[hidden] { display: none; }
.dir-steps ol { margin: 0; padding-left: 22px; }
.dir-steps li { color: #f5f0e4; font-size: 13.5px; line-height: 1.65; }
.dir-steps li::marker { color: #d9b44a; font-weight: 900; }

/* the in-app "Route" links: a button, not a bare link */
.guide-dir-link, .dir-open { display: inline-block; margin-top: 6px; padding: 7px 13px;
  border-radius: 11px; text-decoration: none; font-weight: 800; font-size: 13px;
  color: #14110c; background: linear-gradient(135deg, #d9b44a, #a8872f); cursor: pointer; }
.dir-open:active { transform: scale(.96); }


/* The landing page opens this as a real <dialog>, so make the element itself the
   overlay and let ::backdrop carry the dim + blur. */
dialog.dir-overlay { position: fixed; inset: 0; width: 100%; max-width: none;
  height: 100%; max-height: none; margin: 0; padding: 14px; border: none;
  background: rgba(4, 3, 2, .82); display: flex; align-items: center;
  justify-content: center; box-sizing: border-box; }
dialog.dir-overlay::backdrop { background: rgba(4, 3, 2, .72); }
dialog.dir-overlay[open] { display: flex; }
dialog.dir-overlay .dir-card { margin: auto; }
.dir-logo i { font-size: 20px; color: #fff; }

/* ── the list modal ─────────────────────────────────────────────────────────
   The same card as the directions dialog, on purpose: one surface, which carries
   three maps in one case and the text in the other. */
.list-card .dir-body { display: flex; flex-direction: column; gap: 10px; }

.list-text {
  box-sizing: border-box;
  width: 100%;
  min-height: 200px;
  max-height: 44vh;
  resize: vertical;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(217, 180, 74, .28);
  background: rgba(255, 255, 255, .045);
  color: #f3ecdd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre;
}

.list-actions { display: flex; gap: 10px; }
.list-actions button {
  box-sizing: border-box;
  flex: 1;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  border: 1px solid rgba(217, 180, 74, .5);
  background: linear-gradient(160deg, rgba(217, 180, 74, .16), rgba(217, 180, 74, .06));
  color: #e8c96a;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.list-actions .list-dl {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
  color: #f3ecdd;
}
.list-actions button:active { transform: scale(.99); }

/* ── mobile first ────────────────────────────────────────────────────────────
   A phone is the device this runs on: the card has to fit a 360-390px screen,
   clear the notch, and keep every row an easy thumb target. The desktop values
   above are the fallback; these tighten it. */
.dir-overlay, dialog.dir-overlay {
  padding: calc(10px + env(safe-area-inset-top, 0px)) 10px calc(10px + env(safe-area-inset-bottom, 0px)) 10px; }
.dir-card { width: min(560px, 100%); max-height: 88vh; }
.dir-head { padding: 13px 14px; }
.dir-title { font-size: 15px; }
.dir-close { width: 36px; height: 36px; }          /* thumb-sized close */
.dir-place { padding: 15px 14px 2px; font-size: 18px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dir-addr { padding: 2px 14px 10px; font-size: 12.5px; }
.dir-choices { padding: 4px 14px 2px; gap: 9px; }
.dir-btn { padding: 12px 13px; gap: 12px; min-height: 62px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.dir-btn b { font-size: 15px; }
.dir-btn small { font-size: 11.5px; }
.dir-logo { width: 40px; height: 40px; border-radius: 11px; }
.dir-logo svg, .dir-logo i { width: 22px; height: 22px; font-size: 19px; }
.dir-note { padding: 8px 14px 14px; font-size: 11px; }
.dir-steps { margin: 2px 14px 6px; padding: 10px 12px; }
.dir-steps li { font-size: 13px; line-height: 1.6; }
.dir-open { min-height: 34px; display: inline-flex; align-items: center; }

/* the navi banner on a narrow screen: it must not swallow the map */
@media (max-width: 430px) {
  .navi-bar { gap: 8px; padding: 10px 11px; left: 8px; right: 8px;
    top: calc(8px + env(safe-area-inset-top, 0px)); border-radius: 16px; }
  .navi-arrow { font-size: 18px; }
  .navi-next { font-size: 14px; white-space: normal; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .navi-sub { font-size: 11.5px; }
  /* a thumb target, not a 33px speck */
  .navi-mode { padding: 6px 7px; font-size: 15px; min-width: 38px; min-height: 38px;
    display: inline-flex; align-items: center; justify-content: center; }
  .navi-go { padding: 8px 10px; font-size: 12px; }
  .navi-stop { width: 32px; height: 32px; }
}
