/* 112 Udkald v6.12 — mobile usability layer.
 * Scoped to handheld viewports; desktop styles and event data are unchanged.
 * Keep this file AFTER the legacy stylesheets rather than adding more overrides to them.
 */
@media (max-width:780px) {
  html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
  body.odin112-next-body { max-width:100%; }
  body.odin112-next-body img, body.odin112-next-body video,
  body.odin112-next-body iframe { max-width:100%; }
  body.odin112-next-body img, body.odin112-next-body video { height:auto; }
  body.odin112-next-body :is(button,select,input,textarea) { font-family:inherit; }
  body.odin112-next-body :is(input,textarea,select) { font-size:max(16px,1em); }
  body.odin112-next-body :is(a,button,select,input,textarea,summary):focus-visible {
    outline:2px solid #7cdbfa;outline-offset:2px;
  }
  /* On narrow phones the header must never compete with its own actions. */
  .cc-app .topbar { gap:5px;min-width:0;overflow:visible;padding-inline:8px; }
  .cc-app .topbar .brand { min-width:0;flex:0 1 auto; }
  .cc-app .o112-live-brand-frame { width:clamp(86px,25vw,105px);flex:none; }
  .cc-app .o112-live-brand-frame .brand-mark { width:105px!important;height:105px!important;max-width:none; }
  .cc-app .top-stats { min-width:0;margin-left:auto; }
  .cc-app .top-stats .live-pill { padding:0 6px;height:32px;font-size:10px;letter-spacing:.3px;gap:5px; }
  .cc-app .top-actions { min-width:0;flex:0 0 auto;margin-left:0;gap:4px; }
  .cc-app .top-actions .icon-btn { width:34px;min-width:34px;height:36px; }
  .cc-app .topbar .o112-global-menu > summary { min-height:36px; }
  /* Keep the requested page links; a horizontal strip scrolls instead of shrinking targets. */
  .cc-app .cc-pages-horizontal { overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;
    scrollbar-width:none;scroll-padding-inline:8px;-webkit-overflow-scrolling:touch; }
  .cc-app .cc-pages-horizontal::-webkit-scrollbar { display:none; }
  .cc-app .cc-pages-horizontal :is(.cc-page-link,.cc-layout-switch-nav) {
    min-height:36px!important;min-width:max-content;font-size:11px!important;
  }
  .cc-app .cc-pages-horizontal .cc-page-link:active { background:rgba(102,214,255,.18); }
  /* Bottom navigation respects home-indicator safe areas. */
  .cc-app .mobile-dock { bottom:max(8px,env(safe-area-inset-bottom));height:60px;
    padding:5px;gap:3px!important; }
  .cc-app .mobile-dock .dock-btn { min-width:0;min-height:48px;height:48px;
    padding:5px 2px;font-size:18px;line-height:1.1;touch-action:manipulation; }
  .cc-app .mobile-dock .dock-btn span { font-size:10px;line-height:1.2;white-space:nowrap; }
  /* Give live incidents usable reading space without permanently hiding the map. */
  .cc-app #mobileFeed.mobile-sheet { height:min(76dvh,720px);max-height:calc(100% - 132px);
    bottom:calc(76px + env(safe-area-inset-bottom));padding:10px 8px 6px;
    min-width:0;overscroll-behavior:contain; }
  .cc-app #mobileFeed .sheet-title { min-height:38px;gap:8px; }
  .cc-app #mobileFeed .sheet-title b { font-size:15px; }
  .cc-app #mobileFeed > .feed-tabs { gap:5px!important;padding:7px 4px 9px!important; }
  .cc-app #mobileFeed > .feed-tabs > .feed-tab { min-height:42px!important;
    font-size:12px!important;line-height:1.2!important;touch-action:manipulation; }
  .cc-app #mobileFeedContent { padding:8px 5px calc(16px + env(safe-area-inset-bottom)); }
  .cc-app #mobileFeedContent .event-card { padding:13px 12px 13px 15px;margin-bottom:9px;
    overflow-wrap:anywhere; }
  .cc-app #mobileFeedContent .event-title { font-size:15px;line-height:1.38; }
  .cc-app #mobileFeedContent .event-loc { font-size:12px;line-height:1.45; }
  .cc-app #mobileFeedContent .event-kind,.cc-app #mobileFeedContent .event-time { font-size:11px; }
  .cc-app #mobileFeedContent .event-context { font-size:11px;flex-wrap:wrap; }
  .cc-app #mobileFeedContent .cc-map-summary-action { font-size:13px; }
  .cc-app :is(.detail-panel,.layer-panel,.cc-menu-panel) {
    bottom:calc(76px + env(safe-area-inset-bottom))!important;
    max-height:calc(100% - 136px)!important;overscroll-behavior:contain;
  }
  .cc-app :is(.detail-panel,.layer-panel) .close-panel,
  .cc-app #mobileFeed .close-panel { min-width:38px;min-height:38px; }
  .cc-app #detailPanel .detail-content { overflow-wrap:anywhere; }
  /* Simple mode: region controls and incident list must remain separately scrollable. */
  .cc-app.cc-layout-simple .cc-local-picker { min-width:0; }
  .cc-app.cc-layout-simple .right-panel { min-height:0;bottom:calc(74px + env(safe-area-inset-bottom))!important; }
  .cc-app.cc-layout-simple .right-panel > .feed { overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;padding-bottom:22px!important; }
  .cc-app.cc-layout-simple .right-panel .event-title { font-size:15px;line-height:1.4; }
  .cc-app.cc-layout-simple .right-panel .event-loc { font-size:12px;line-height:1.5; }
  .cc-app.cc-layout-simple .right-panel > .feed-tabs > .feed-tab { min-height:42px!important; }
  .cc-app .cc-local-city-area select { min-height:38px;font-size:16px!important;max-width:100%; }
  /* Alerts should prioritize meaningful message text on the smallest screen. */
  .o112-site-alerts .o112-alert__text { min-width:0;overflow-wrap:anywhere; }
  .o112-site-alerts .o112-alert__line { gap:7px; }
  .o112-site-alerts .o112-alert__icon { font-size:17px; }
  .o112-site-alerts .o112-alert__close { min-width:32px;min-height:32px; }
  /* Avoid advertising/media content forcing horizontal overflow on landing pages. */
  .o112-landing-main,.o112-landing-grid,.o112-landing-panel { min-width:0; }
  .o112-landing-panel :is(img,video,iframe) { max-width:100%; }
  .o112-landing-shortcuts a { min-width:0;overflow-wrap:anywhere; }
}
@media(max-width:390px){
  .cc-app .topbar .o112-live-brand-frame { width:84px;height:50px; }
  .cc-app .topbar .o112-live-brand-frame .brand-mark { width:96px!important;height:96px!important; }
  .cc-app .top-stats .live-pill { padding-inline:5px;font-size:9px; }
  .cc-app .top-actions { gap:2px; }
  .cc-app .top-actions .icon-btn { width:31px;min-width:31px; }
  .cc-app #mobileFeed .sheet-title b { font-size:14px; }
  .cc-app .mobile-dock .dock-btn span { font-size:9px; }
}
@media(max-width:780px) and (orientation:landscape) and (max-height:520px){
  .cc-app #mobileFeed.mobile-sheet { height:calc(100% - 132px); }
  .cc-app .mobile-dock { height:52px; }
  .cc-app .mobile-dock .dock-btn { height:43px;min-height:43px; }
}
@media(prefers-reduced-motion:reduce){
  .cc-app .mobile-sheet,.cc-app .detail-panel,.cc-app .layer-panel,
  .cc-app .cc-menu-panel { transition:none!important; }
}

/* v6.13: Simple view on phones — prioritize complete incident cards.
   The geographic selector stays visible, but the feed owns the remaining viewport. */
@media (max-width:780px) {
  .cc-app.cc-layout-simple .cc-local-picker {
    top:108px!important;
    height:130px!important;
    min-height:0!important;
    padding:7px 10px!important;
    overflow:visible!important;
  }
  .cc-app.cc-layout-simple .cc-local-picker-heading { gap:5px!important; }
  .cc-app.cc-layout-simple .cc-local-picker-heading h2 { font-size:13px!important;margin:0!important; }
  .cc-app.cc-layout-simple .cc-local-eyebrow { display:none!important; }
  .cc-app.cc-layout-simple .cc-local-all { padding:5px 7px!important;font-size:11px!important; }
  .cc-app.cc-layout-simple .cc-local-picker-body {
    display:grid!important;
    grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)!important;
    gap:7px!important;
    margin-top:5px!important;
    align-items:start;
  }
  .cc-app.cc-layout-simple .cc-local-region-map {
    height:79px!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:repeat(3,minmax(0,1fr))!important;
    padding:15px 4px 3px!important;
    gap:3px!important;
  }
  .cc-app.cc-layout-simple .cc-local-map-caption { top:3px!important;left:6px!important;font-size:8px!important; }
  .cc-app.cc-layout-simple .cc-local-region {
    padding:2px 1px!important;
    font-size:9px!important;
    line-height:1.05!important;
  }
  .cc-app.cc-layout-simple .cc-local-city-area label { margin:0 0 3px!important;font-size:10px!important; }
  .cc-app.cc-layout-simple .cc-local-city-area select { min-height:34px!important;height:34px!important;font-size:16px!important;padding:3px!important; }
  .cc-app.cc-layout-simple .cc-local-selection { margin-top:4px!important;font-size:10px!important;line-height:1.2!important; }
  .cc-app.cc-layout-simple .cc-local-city-area p { display:none!important; }
  .cc-app.cc-layout-simple .right-panel {
    top:246px!important;
    bottom:calc(70px + env(safe-area-inset-bottom))!important;
    min-height:0!important;
    height:auto!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
  }
  .cc-app.cc-layout-simple .right-panel > .feed-head { flex:0 0 auto!important;min-height:0!important;padding-block:5px!important; }
  .cc-app.cc-layout-simple .right-panel > .feed-tabs {
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:none!important;
    grid-template-columns:none!important;
    grid-auto-rows:auto!important;
    padding:5px 7px!important;
    gap:5px!important;
    min-height:0!important;
    max-height:54px!important;
    flex:0 0 auto!important;
    -webkit-overflow-scrolling:touch;
  }
  .cc-app.cc-layout-simple .right-panel > .feed-tabs::-webkit-scrollbar { display:none; }
  .cc-app.cc-layout-simple .right-panel > .feed-tabs > .feed-tab {
    width:auto!important;
    min-width:max-content!important;
    flex:0 0 auto!important;
    height:38px!important;
    min-height:38px!important;
    padding:5px 10px!important;
    white-space:nowrap!important;
    font-size:12px!important;
  }
  .cc-app.cc-layout-simple .right-panel > .feed:not([hidden]),
  .cc-app.cc-layout-simple .right-panel > .cc-system-bulletins:not([hidden]) {
    flex:1 1 0!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    padding:7px 9px 18px!important;
  }
}
@media (max-width:780px) and (max-height:600px) {
  .cc-app.cc-layout-simple .cc-local-picker { height:113px!important; }
  .cc-app.cc-layout-simple .cc-local-region-map { height:66px!important; }
  .cc-app.cc-layout-simple .right-panel { top:229px!important; }
}

/* v6.14: The coverage explanation must not overflow the compact region picker. */
@media (max-width:780px) {
  .cc-app.cc-layout-simple .cc-local-picker .cc-local-explanation { display:none!important; }
  .cc-app.cc-layout-simple .cc-local-picker .cc-local-picker-heading { min-width:0; }
  .cc-app.cc-layout-simple .cc-local-coverage-info {
    flex:0 0 30px; width:30px; height:30px; border-radius:8px;
    background:#183d51; border:1px solid #4c849d; color:#e8f9ff;
    font-size:17px; line-height:1; cursor:pointer; touch-action:manipulation;
  }
  .cc-app.cc-layout-simple .cc-local-picker-heading > div:first-child { min-width:0; flex:1 1 auto; }
}
.cc-local-coverage-dialog {
  width:min(92vw,520px); max-height:min(82dvh,700px); margin:auto;
  padding:20px; border-radius:15px; border:1px solid #54859b;
  background:#122b3a; color:#e6f4fc; box-shadow:0 16px 65px #0008;
  overflow-y:auto; line-height:1.55;
}
.cc-local-coverage-dialog::backdrop { background:rgba(2,12,20,.76); }
.cc-local-coverage-dialog h2 { color:#fff; font-size:18px; margin:0 36px 12px 0; line-height:1.3; }
.cc-local-coverage-dialog p { font-size:14px; margin:0 0 12px; }
.cc-local-coverage-dialog .cc-local-coverage-close {
  position:absolute; right:12px; top:12px; min-width:38px; min-height:38px;
  border:1px solid #547d94; border-radius:9px; color:white; background:#1b4051;
  cursor:pointer; font-size:23px;
}
