/* flo.css — Flo, the FloodRadar helper (bubble + panel). Loaded only when the widget renders.
   z-index: bubble + nudge 1160 (the header's reserved 1101-1189 gap: above Leaflet panes and the
   1150 header, below .prv2-stickybuy 1190 and the 1200 phone tab bars); open panel 1260 (over the
   tab bars like the other sheets at 1240-1250, under .prv2-pickmodal 1300 and #briefingPanel 2000). */
.flo { --flo-blue: #1d6fb8; --flo-navy: #0c2747; --flo-sky: #eaf4fd; --flo-amber: #ffb703; --flo-ink: #1f2d3d; --flo-muted: #5a6a7e; --flo-line: #e3e9f2;
       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.45; color: var(--flo-ink); }
.flo *, .flo *::before, .flo *::after { box-sizing: border-box; }
.flo [hidden] { display: none !important; }   /* our display:flex rules must never beat the hidden attribute */
/* styles.css has a bare `button` rule (padding, purple background, hover) — neutralise it inside the widget first. */
#flo-root button { padding: 0; margin: 0; background: none; border: 0; border-radius: 0; font: inherit; color: inherit; transition: none; box-shadow: none; }
#flo-root button:hover { background: none; }
body.capture-mode .flo { display: none !important; }   /* station chart captures (?capture=chart) */
.flo .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bubble */
#flo-root .flo-fab { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 1160;
  display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 8px 0 6px; border: 0; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--flo-navy); box-shadow: 0 8px 24px rgba(12, 39, 71, .22), 0 1px 3px rgba(12, 39, 71, .12);
  transition: transform .18s ease, box-shadow .18s ease; }
#flo-root .flo-fab:hover, #flo-root .flo-fab:focus-visible { background: #fff; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(12, 39, 71, .28); outline: none; }
#flo-root .flo-fab:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--flo-blue); }
.flo-fab-icon { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: var(--flo-sky); }
.flo-fab-icon svg { width: 36px; height: 36px; }
.flo-fab-label { font-weight: 800; font-size: 15px; padding-right: 8px; }
@media (max-width: 767px) { #flo-root .flo-fab { padding: 0; width: 56px; justify-content: center; } .flo-fab-label { display: none; } }
/* Phones carry a fixed 56px tab bar (.fr-tabbar / .h3-tabbar) at the bottom: sit above it. */
@media (max-width: 640px) { #flo-root .flo-fab { bottom: calc(56px + 18px + env(safe-area-inset-bottom, 0px)); } .flo-nudge { bottom: calc(56px + 84px + env(safe-area-inset-bottom, 0px)); } }
#flo-root.is-open .flo-fab { display: none; }   /* id-scoped: must beat #flo-root .flo-fab { display:flex } */

/* Nudge */
.flo-nudge { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 1160;
  display: flex; align-items: center; gap: 8px; max-width: 260px; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--flo-navy); color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 24px rgba(12, 39, 71, .3); animation: flo-pop .25s ease-out; }
.flo-nudge::after { content: ""; position: absolute; right: 22px; bottom: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: var(--flo-navy); }
#flo-root .flo-nudge-x { border: 0; background: transparent; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .8; }
#flo-root .flo-nudge-x:hover { opacity: 1; background: transparent; }

/* Panel */
.flo-panel { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 1260;
  width: 372px; max-width: calc(100vw - 24px); height: min(580px, calc(100vh - 36px)); display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--flo-line); border-radius: 18px; box-shadow: 0 18px 50px rgba(12, 39, 71, .28); overflow: hidden; animation: flo-pop .2s ease-out; }
@media (max-width: 639px) { .flo-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100%; height: 100dvh; border-radius: 0; border: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px); } }
.flo-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; box-shadow: none; /* styles.css header rule */ background: linear-gradient(135deg, #1d6fb8, #0c2747); color: #fff; }
.flo-head-icon { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, .92); flex: 0 0 auto; }
.flo-head-text { flex: 1 1 auto; min-width: 0; }
.flo-head h2 { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.15; }
.flo-head p { margin: 2px 0 0; font-size: 12px; opacity: .85; }
.flo-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--flo-amber); color: var(--flo-navy); font-weight: 800; font-size: 11px; }
#flo-root .flo-ib { flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
#flo-root .flo-ib:hover, #flo-root .flo-ib:focus-visible { background: rgba(255, 255, 255, .28); outline: none; }

.flo-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 12px 6px; background: #f7fafd; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.flo-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; white-space: normal; word-wrap: break-word; overflow-wrap: anywhere; }
.flo-msg p { margin: 0 0 8px; } .flo-msg p:last-child { margin-bottom: 0; }
.flo-msg ul { margin: 4px 0 6px 18px; padding: 0; } .flo-msg li { margin: 2px 0; }
.flo-msg-bot { align-self: flex-start; background: #fff; border: 1px solid var(--flo-line); border-bottom-left-radius: 6px; }
.flo-msg-user { align-self: flex-end; background: var(--flo-blue); color: #fff; border-bottom-right-radius: 6px; }
.flo-msg-sys { align-self: center; max-width: 96%; background: #fff6e0; border: 1px solid #ffe2a3; color: #6b4a00; font-size: 14px; text-align: center; }
.flo-msg-err { background: #fdecec; border-color: #f5c2c2; color: #7a1f1f; }
.flo-safety { align-self: flex-start; max-width: 88%; padding: 9px 12px; border-radius: 12px; background: #fff3cd; border: 1px solid #ffe08a; color: #5c4400; font-size: 14px; }
.flo-safety strong { color: #7a1f1f; }
.flo-chips { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
#flo-root .flo-chip { border: 1px solid #c9dcf0; background: #fff; color: var(--flo-blue); font-weight: 700; font-size: 13px; padding: 6px 11px; border-radius: 999px; cursor: pointer; }
#flo-root .flo-chip:hover, #flo-root .flo-chip:focus-visible { background: var(--flo-sky); outline: none; }
.flo-rate { display: flex; gap: 4px; align-self: flex-start; margin: -4px 0 0 6px; }
#flo-root .flo-rate button { border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; border-radius: 6px; opacity: .55; }
#flo-root .flo-rate button:hover, #flo-root .flo-rate button:focus-visible { opacity: 1; background: #e9eff7; outline: none; }
#flo-root .flo-rate button.on { opacity: 1; background: var(--flo-sky); }
.flo-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--flo-line); border-radius: 16px; border-bottom-left-radius: 6px; }
.flo-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9db4cf; animation: flo-dot 1s infinite ease-in-out; }
.flo-typing span:nth-child(2) { animation-delay: .15s; } .flo-typing span:nth-child(3) { animation-delay: .3s; }

.flo-meter { display: flex; align-items: center; gap: 8px; padding: 6px 14px 0; font-size: 11.5px; color: var(--flo-muted); background: #fff; border-top: 1px solid var(--flo-line); }
.flo-meter-bar { flex: 1 1 auto; height: 5px; border-radius: 3px; background: #e9eff7; overflow: hidden; }
.flo-meter-bar span { display: block; height: 100%; width: 0; background: var(--flo-blue); transition: width .3s ease; }
.flo-meter-bar span.warn { background: #e0891b; } .flo-meter-bar span.full { background: #c0392b; }
.flo-compose { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px 4px 12px; background: #fff; }
.flo-compose textarea { flex: 1 1 auto; resize: none; min-height: 40px; max-height: 120px; padding: 9px 12px; border: 1px solid #c9d6e6; border-radius: 12px; font: inherit; color: var(--flo-ink); background: #fff; }
.flo-compose textarea:focus { outline: none; border-color: var(--flo-blue); box-shadow: 0 0 0 3px rgba(29, 111, 184, .18); }
#flo-root .flo-send { flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--flo-blue); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
#flo-root .flo-send:disabled { background: #b9c8da; cursor: default; }
#flo-root .flo-send:not(:disabled):hover, #flo-root .flo-send:focus-visible { background: #155a97; outline: none; }
.flo-counter { text-align: right; font-size: 11px; color: var(--flo-muted); padding: 0 14px; background: #fff; }
.flo-foot { margin: 0; /* styles.css footer rule */ padding: 6px 12px 10px; font-size: 11px; color: var(--flo-muted); background: #fff; text-align: center; }
.flo-foot a { color: var(--flo-blue); }

@keyframes flo-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes flo-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .flo-panel, .flo-nudge { animation: none; } .flo-typing span { animation: none; opacity: .7; } #flo-root .flo-fab { transition: none; } .flo-body { scroll-behavior: auto; } }
@media print { .flo { display: none !important; } }
