/* Day maps, installable app, language switcher and voice input. */

/* Day route and map */
.day-route { margin: 12px 0 4px; }
.day-map { height: 190px; border: 2px solid var(--navy); border-radius: var(--r); overflow: hidden; background: var(--sea); z-index: 0; }
.day-route.no-map .day-map { display: none; }
.day-route-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; }
.day-route-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.875rem; color: var(--brand); }
.day-route-link::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat; }
.dm-pin span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--navy); background: var(--sun); color: var(--navy); font: 800 0.75rem/1 var(--font); box-shadow: 1px 1px 0 var(--navy); }
.dm-pin.dm-stay span { background: var(--brand); color: #fff; }

/* Offline badge and install prompt */
.tb-offline { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 60; padding: 4px 12px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 0.8125rem; font-weight: 700; box-shadow: var(--pop-sm); }
.tb-offline[hidden], .tb-install[hidden] { display: none; }
.tb-install { position: fixed; left: 14px; bottom: 14px; z-index: 55; display: inline-flex; align-items: center; border: 2px solid var(--navy); border-radius: 999px; background: var(--paper); box-shadow: var(--pop-sm); font-size: 0.875rem; }
.tb-install button { border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; }
.tb-install-go { padding: 6px 4px 6px 14px; font-weight: 700; }
.tb-install-x { padding: 6px 12px 6px 8px; font-size: 1.1rem; line-height: 1; color: var(--ink-3); }

/* Language switcher */
.lang-select { height: 34px; max-width: 96px; padding: 0 6px; border: 2px solid var(--navy); border-radius: 999px; background: var(--paper); color: var(--ink); font: 700 0.8125rem var(--font); cursor: pointer; }
html[lang="hi"] { --font: "Figtree", "Noto Sans Devanagari", ui-sans-serif, system-ui, sans-serif; --display: "Bricolage Grotesque", "Noto Sans Devanagari", "Figtree", sans-serif; --hand: "Caveat", "Noto Sans Devanagari", cursive; }
html[lang="bn"] { --font: "Figtree", "Noto Sans Bengali", ui-sans-serif, system-ui, sans-serif; --display: "Bricolage Grotesque", "Noto Sans Bengali", "Figtree", sans-serif; --hand: "Caveat", "Noto Sans Bengali", cursive; }

/* Voice input */
.voice-btn { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 2px solid var(--navy); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; }
.voice-btn .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.voice-btn.is-on { background: var(--coral); color: #fff; animation: voice-pulse 1.2s ease-in-out infinite; }
.has-voice { position: relative; }
.has-voice textarea { padding-right: 52px; }
.voice-float { position: absolute; right: 10px; bottom: 10px; }
.voice-inline { margin: 0 6px; align-self: center; }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 90, 95, 0.25); } }

/* Server-rendered plan shown before the app loads */
.ssr-plan { padding-top: 24px; padding-bottom: 40px; }
.ssr-plan h2 { margin: 24px 0 4px; font-size: 1.25rem; }
.ssr-plan ul { padding-left: 20px; }

@media (max-width: 640px) {
  .lang-select { max-width: 76px; }
  .day-map { height: 170px; }
}
@media (prefers-reduced-motion: reduce) { .voice-btn.is-on { animation: none; } }
