/* 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 { display: flex; align-items: center; gap: 6px; width: calc(100% - 32px); max-width: 560px; margin: 10px auto 0; padding: 4px 4px 4px 14px; border: 2px solid var(--navy); border-radius: 999px; background: var(--paper); box-shadow: var(--pop-sm); font-size: 0.875rem; }
.tb-install-txt { flex: 1; min-width: 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-install-txt b { color: var(--ink); }
.tb-install button { border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; }
.tb-install-go { padding: 6px 14px; border-radius: 999px; background: var(--sun) !important; font-weight: 700; }
.tb-install-x { padding: 6px 10px; 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 */
/* A full-page spinner keeps the footer below the fold, so the page that replaces it doesn't push the footer down. */
#app > .loading { min-height: 100vh; }
.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; }
.ssr-guide { max-width: 760px; line-height: 1.6; }
.ssr-guide h1 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin-bottom: 16px; }
.ssr-guide h3 { margin: 16px 0 2px; font-size: 1.05rem; }
.ssr-guide ol { padding-left: 20px; }
.ssr-guide li { margin: 4px 0; }
.ssr-answer { background: var(--surface); border: 1px solid var(--hair); border-left: 4px solid var(--brand); border-radius: var(--r); padding: 16px 20px; box-shadow: var(--sh-1); }
.ssr-answer p { margin: 4px 0; }
.ssr-table { width: 100%; border-collapse: collapse; margin: 8px 0; background: var(--surface); border-radius: var(--r-sm); overflow: hidden; }
.ssr-table th, .ssr-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hair); }
.ssr-table th { font-size: 0.85rem; color: var(--ink-2); background: var(--surface-2); }
.ssr-cta { margin: 28px 0; padding: 20px; background: var(--brand-50); border: 1px solid var(--hair); border-radius: var(--r-lg); }
.ssr-cta .btn { margin: 8px 8px 0 0; }

@media (max-width: 640px) {
  .lang-select { max-width: 76px; }
  .day-map { height: 170px; }
  .ssr-table th, .ssr-table td { padding: 8px; }
  .ssr-table th:first-child, .ssr-table td:first-child { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .voice-btn.is-on { animation: none; } }
