/*
 * Auto-Navi demo (cursor + control bar), floating assistant and island weather.
 * Colours come from the site's own skin tokens (--rt-* from the island theme,
 * --ab-* on the front page), so A (day), B (night) and C (sunset) all match.
 */
:root { --na-bg: var(--rt-surface, #FFFDF7); --na-bg2: var(--rt-surface2, #F4E9D0); --na-text: var(--rt-text, #003F5C); --na-muted: var(--rt-muted, #5E4B36); --na-line: var(--rt-line, rgba(139,115,85,.24)); --na-deep: var(--rt-deep, #003F5C); --na-on-deep: var(--rt-on-deep, #FFF8EC); --na-accent: var(--rt-accent, #06D6C4); --na-on-accent: var(--rt-on-accent, #003F5C); --na-brand: var(--rt-brand, #C8161D); --na-on-brand: var(--rt-on-brand, #FFF8EC); --na-font: var(--rt-body, system-ui, sans-serif); --na-shadow: 0 14px 40px rgba(0,0,0,.28); }

/* ---------- Watch the demo ---------- */
#ab-home .navi-watch { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 2px solid currentColor; background: transparent; color: var(--ab-text); font-weight: 700; font-size: 16px; cursor: pointer; }
#ab-home .navi-watch[hidden] { display: none; }
#ab-home .navi-watch svg.i { fill: currentColor; stroke: none; }
html[data-rental-theme="night"] #ab-home .navi-watch { color: #FFF8EC; background: rgba(26,26,46,.55); }
html[data-rental-theme="sunset"] #ab-home .navi-watch { color: #1A1A2E; background: rgba(255,248,236,.35); }
.navi-cursor { position: fixed; left: 0; top: 0; z-index: 130; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #E3000F; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.45); pointer-events: none; opacity: 0; transform: translate(50vw, 50vh); transition: transform .65s cubic-bezier(.3,.7,.2,1), opacity .2s; }
.navi-cursor.is-on { opacity: 1; }
.navi-cursor.navi-jump { transition: none; }
.navi-cursor::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #E3000F; opacity: 0; }
.navi-cursor.navi-tap::after { animation: navi-tap .5s ease-out 1; }
@keyframes navi-tap { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(2.6); } }
[data-autonavi-active="true"] { outline: 3px solid #E3000F !important; outline-offset: 4px !important; }
.navi-bar { position: fixed; z-index: 120; top: calc(8px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); width: min(720px, calc(100vw - 16px)); box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 16px; background: #1A1A2E; color: #FFF8EC; font: 600 14px/1.35 var(--na-font); box-shadow: var(--na-shadow); border: 1px solid rgba(255,248,236,.25); }
.navi-bar .navi-text { margin: 0; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.navi-bar .navi-count { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #FFD23F; }
.navi-bar .navi-btn { flex: 0 0 auto; min-width: 64px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255,248,236,.45); background: transparent; color: #FFF8EC; font: 700 14px/1 var(--na-font); cursor: pointer; }
.navi-bar .navi-btn[hidden] { display: none; }
.navi-bar .navi-stop { background: #E3000F; border-color: #E3000F; color: #fff; }
.navi-bar .navi-btn:focus-visible { outline: 3px solid #FFD23F; outline-offset: 2px; }
/* While the demo runs the assistant bubble is put away: it can never sit on the Stop button or the map. */
html.navi-running #rental-assistant { display: none; }

/* ---------- Floating assistant ---------- */
#rental-assistant, #rental-assistant * { box-sizing: border-box; }
#rental-assistant { font-family: var(--na-font); }
.ra-bubble { position: fixed; z-index: 45; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 8px; min-width: 56px; height: 56px; padding: 0 18px; border-radius: 28px; border: 0; background: var(--na-brand); color: var(--na-on-brand); font: 700 15px/1 var(--na-font); cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.ra-bubble svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.ra-bubble:focus-visible, .ra-panel button:focus-visible, .ra-panel a:focus-visible, .ra-panel input:focus-visible, .ra-log:focus-visible { outline: 3px solid var(--na-accent); outline-offset: 2px; }
#rental-assistant.ra-open .ra-bubble { display: none; }
.ra-panel { position: fixed; z-index: 100; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100vh - 32px)); display: flex; flex-direction: column; background: var(--na-bg); color: var(--na-text); border: 1px solid var(--na-line); border-radius: 20px; box-shadow: var(--na-shadow); overflow: hidden; }
.ra-panel[hidden] { display: none; }
.ra-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 18px; background: var(--na-deep); color: var(--na-on-deep); }
.ra-head h2 { margin: 0; font: 800 17px/1.2 var(--rt-display, var(--na-font)); color: inherit; }
.ra-close { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.ra-note { margin: 0; padding: 8px 18px; font-size: 12px; line-height: 1.4; color: var(--na-muted); background: var(--na-bg2); }
.ra-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; overflow-wrap: anywhere; }
.ra-msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; }
.ra-msg p { margin: 0; }
.ra-bot { align-self: flex-start; background: var(--na-bg2); color: var(--na-text); border-bottom-left-radius: 6px; }
.ra-user { align-self: flex-end; background: var(--na-deep); color: var(--na-on-deep); border-bottom-right-radius: 6px; }
.ra-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ra-action, .ra-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; font: 700 14px/1.2 var(--na-font); cursor: pointer; text-decoration: none; }
.ra-action { border: 0; background: var(--na-accent); color: var(--na-on-accent); }
.ra-chips { display: flex; flex-wrap: nowrap; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--na-line); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.ra-chip { flex: 0 0 auto; white-space: nowrap; }
.ra-chips:empty { display: none; }
.ra-chip { border: 1px solid var(--na-line); background: var(--na-bg); color: var(--na-text); }
.ra-form { display: flex; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--na-line); }
.ra-form input { flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--na-line); background: var(--rt-input, #fff); color: var(--na-text); font: 400 16px/1 var(--na-font); }
.ra-send { flex: 0 0 auto; min-width: 64px; height: 48px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--na-brand); color: var(--na-on-brand); font: 700 15px/1 var(--na-font); cursor: pointer; }
.ra-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 520px) {
  .ra-bubble { padding: 0; width: 56px; justify-content: center; }
  .ra-bubble-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* Phones: a full-height sheet. */
  .ra-panel { inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .ra-head { padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
}

/* ---------- Weather ---------- */
#rental-island-bar .rt-wx { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(255,248,236,.3); color: inherit; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
#rental-island-bar a.rt-wx:focus-visible { outline: 2px solid var(--rt-accent, #06D6C4); outline-offset: 2px; }
#rental-island-bar .rt-wx-off { font-weight: 500; opacity: .85; }
@media (max-width: 520px) { #rental-island-bar .rt-wx { min-height: 44px; padding: 0 10px; } }
#ab-home .wx-card, .wx-card { background: var(--ab-card, var(--na-bg)); color: var(--ab-text, var(--na-text)); border: 1px solid var(--ab-line, var(--na-line)); border-radius: 20px; padding: 22px; box-shadow: var(--ab-card-shadow, none); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wx-card[hidden] { display: none !important; }
.wx-card .wx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
#ab-home .wx-card h2 { font-size: 24px; font-weight: 800; line-height: 1.2; }
.wx-card .wx-place { margin: 0; font-size: 14px; color: var(--ab-muted, var(--na-muted)); }
.wx-card .wx-now { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.wx-card .wx-temp { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wx-card .wx-temp b { font: 800 44px/1 var(--ab-display, var(--na-font)); }
.wx-card .wx-icon { font-size: 34px; line-height: 1; }
.wx-card .wx-feels { font-size: 15px; color: var(--ab-muted, var(--na-muted)); }
.wx-card .wx-facts { margin: 0; flex: 1 1 260px; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px 18px; }
.wx-card .wx-facts div { min-width: 0; }
.wx-card .wx-facts dt { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ab-muted, var(--na-muted)); }
.wx-card .wx-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 16px; }
.wx-card .wx-hint { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--ab-card2, var(--na-bg2)); font-weight: 600; font-size: 14px; }
#ab-home .wx-card .wx-next { font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--ab-muted, var(--na-muted)); }
.wx-card .wx-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.wx-card .wx-days li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--ab-card2, var(--na-bg2)); font-size: 14px; min-width: 0; }
.wx-card .wx-days b { font-size: 15px; }
.wx-card .wx-range { font-weight: 700; font-size: 17px; }
.wx-card .wx-off { margin: 0; font-weight: 600; }
.wx-card .wx-credit { margin: 0; font-size: 12px; color: var(--ab-muted, var(--na-muted)); }
@media (max-width: 520px) { #ab-home .wx-card, .wx-card { padding: 16px; } .wx-card .wx-temp b { font-size: 38px; } }
@media (prefers-reduced-motion: reduce) { .navi-cursor, .navi-cursor::after { transition: none !important; animation: none !important; } }
