/* Shared presentation and reading tools for all locally hosted portal pages. */
:root{--portal-text:18px;--portal-control:17px;--portal-heading:26px;--portal-small:15px;--portal-nav:17px;--portal-accent:#087b84}
html body .portal-readable :is(p,li,td,th,dd,dt,blockquote):not(.leaflet-container *){font-size:var(--portal-text)!important;line-height:1.65!important}
html body .portal-readable :is(label,input,select,textarea,button):not(.leaflet-container *){font-size:var(--portal-control)!important;line-height:1.45!important}
html body .portal-readable :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){min-height:46px;max-width:100%;box-sizing:border-box}
html body .portal-readable h2{font-size:calc(var(--portal-heading) + 3px)!important;line-height:1.3!important}html body .portal-readable h3{font-size:var(--portal-heading)!important;line-height:1.35!important}html body .portal-readable h4{font-size:calc(var(--portal-text) + 2px)!important;line-height:1.4!important}html body .portal-readable small{font-size:var(--portal-small)!important;line-height:1.5!important}
html body .portal-readable :is(button,a[role=button]):not(.leaflet-container *){min-height:44px}html body .portal-readable :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #cb880d!important;outline-offset:3px!important}
html body .portal-ui-tools{display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:12px!important;background:#fff!important;color:#193d54!important;border:1px solid #ccdde7!important;border-radius:14px!important;box-shadow:0 5px 20px #133c5410!important;padding:14px 18px!important;margin:16px 0 22px!important;position:relative;z-index:2;box-sizing:border-box;width:100%;font-family:'Segoe UI',system-ui,sans-serif!important}
html body .portal-ui-tools .portal-tool-title{display:flex!important;align-items:center;gap:9px;font-size:17px!important;font-weight:750;color:#164b65!important}html body .portal-ui-tools .portal-tool-actions{display:flex!important;align-items:center;gap:8px;flex-wrap:wrap}html body .portal-ui-tools button,html body .portal-section-browser button,html body .portal-table-filter button{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;min-height:46px!important;font:650 16px/1.4 'Segoe UI',system-ui,sans-serif!important;padding:10px 14px!important;background:#eef5f8!important;color:#17455f!important;border:1px solid #bcd0de!important;border-radius:9px!important;box-shadow:none!important;text-transform:none!important;letter-spacing:0!important;cursor:pointer!important;white-space:normal!important}
html body .portal-ui-tools button:hover,html body .portal-section-browser button:hover{background:#dceff1!important;border-color:#087b84!important}html body .portal-ui-tools button:disabled{opacity:.45;cursor:default!important}html body .portal-ui-tools .portal-size-group{display:flex;align-items:center;gap:5px;border-left:1px solid #d8e4ec;padding-left:8px}html body .portal-ui-tools output{font-size:14px!important;min-width:36px;text-align:center;color:#466477!important}
html body .portal-tool-icon,html body .portal-menu-symbol{display:inline-grid!important;place-items:center;flex-shrink:0;color:inherit!important}html body .portal-tool-icon svg,html body .portal-menu-symbol svg{width:21px!important;height:21px!important;display:block!important}
html body .portal-section-browser{background:#f1f7fa!important;border:1px solid #d0e0ea;border-radius:14px;padding:20px;margin:-8px 0 22px;color:#193d54!important;box-sizing:border-box}html body .portal-section-browser[hidden]{display:none!important}html body .portal-section-browser label{display:block;font-size:17px!important;font-weight:700;color:#264e67!important}html body .portal-section-browser input{display:block!important;width:100%!important;box-sizing:border-box!important;min-height:48px!important;margin:8px 0 12px!important;padding:12px 14px!important;font:18px/1.4 'Segoe UI',system-ui,sans-serif!important;color:#163c53!important;background:#fff!important;border:1px solid #abc4d5!important;border-radius:9px!important}html body .portal-section-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:10px;max-height:440px;overflow:auto;padding:4px}html body .portal-section-results button{justify-content:flex-start!important;text-align:left!important;min-height:76px!important;background:#fff!important;padding:16px!important;border-left:3px solid #087b84!important}html body .portal-search-status{font-size:15px!important;color:#506c7e!important;margin:8px 0!important}
html body .portal-surface{border-radius:15px!important;border:1px solid #d1e0e9!important;box-shadow:0 5px 20px #163b5010!important;transition:box-shadow .2s,border-color .2s}html body .portal-surface:focus-within,html body .portal-surface:hover{border-color:#8ab6c5!important;box-shadow:0 8px 25px #163b5018!important}
html body .portal-table-region{overflow:auto!important;max-width:100%!important;max-height:70vh;border:1px solid #cbdce7!important;border-radius:11px;position:relative;scrollbar-color:#7396ab #edf4f8;isolation:isolate;overscroll-behavior-x:contain;margin:12px 0}html body .portal-table-region>table{width:100%!important;min-width:650px;border-collapse:separate!important;border-spacing:0!important;background:#fff!important;color:#203d52!important;font-size:var(--portal-text)!important}html body .portal-table-region :is(th,td){font-size:var(--portal-text)!important;line-height:1.6!important;padding:14px 16px!important;min-width:115px;border-right:1px solid #dbe6ed!important;border-bottom:1px solid #dbe6ed!important;text-align:left;vertical-align:top;white-space:normal!important;color:#203d52!important;background:#fff!important}html body .portal-table-region th{position:sticky;top:0;z-index:2;background:#e7f0f6!important;color:#16425d!important;font-weight:750!important;text-transform:none!important}html body .portal-table-region tr:nth-child(even) td{background:#f4f8fb!important}html body .portal-table-region tbody tr:hover td{background:#eaf5f5!important}html body .portal-table-filter{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:16px 0 6px;color:#244b63!important}html body .portal-table-filter label{font-size:16px!important;font-weight:650}html body .portal-table-filter input{font:17px/1.4 'Segoe UI',system-ui,sans-serif!important;min-height:46px;padding:10px 12px!important;border:1px solid #b1c9d8!important;border-radius:8px!important;background:#fff!important;color:#163b53!important;max-width:100%;box-sizing:border-box}html body .portal-table-filter output{font-size:14px!important;color:#526e80!important}html body .portal-table-region tr[hidden]{display:none!important}
html body #mobilePrimaryNav .portal-nav-enhanced,html body .committee-nav .portal-nav-enhanced{font-size:var(--portal-nav)!important;line-height:1.45!important;min-height:54px!important;white-space:normal!important;border-radius:10px!important;transition:background .18s,box-shadow .18s}html body #mobilePrimaryNav .portal-nav-enhanced:hover,html body .committee-nav .portal-nav-enhanced:hover{box-shadow:inset 3px 0 #70cbd0!important}html body #mobilePrimaryNav .portal-nav-enhanced.active,html body #mobilePrimaryNav .portal-nav-enhanced[aria-current],html body .committee-nav .portal-nav-enhanced[aria-current]{background:#24536a!important;border-color:#78bdce!important;color:#fff!important;box-shadow:inset 4px 0 #7ce1e5!important}html body #mobilePrimaryNav .portal-menu-symbol,html body .committee-nav .portal-menu-symbol{width:30px!important;height:30px!important;border-radius:8px;background:#ffffff12!important;margin-right:8px;vertical-align:middle;position:static!important}html body #mobilePrimaryNav .portal-menu-label,html body .committee-nav .portal-menu-label{display:inline!important;font-size:var(--portal-nav)!important;line-height:1.4!important;color:inherit!important;visibility:visible!important;white-space:normal!important;position:static!important;opacity:1!important}
html body .portal-section-target{scroll-margin-top:110px!important}html body .portal-section-target:focus{outline:3px solid #087b84!important;outline-offset:6px!important;border-radius:5px}
@media(max-width:650px){html body .portal-ui-tools{padding:12px!important;align-items:flex-start!important}html body .portal-ui-tools .portal-tool-actions{width:100%;justify-content:space-between}html body .portal-ui-tools button{padding:9px 11px!important}html body .portal-section-browser{padding:14px}html body .portal-section-results{grid-template-columns:1fr}html body .portal-readable h2{font-size:calc(var(--portal-heading) + 1px)!important}html body .portal-readable h3{font-size:calc(var(--portal-heading) - 2px)!important}html body .portal-table-filter input{width:100%}html body .portal-readable :is(.content-grid,.preparedness-grid,.quick-grid){grid-template-columns:1fr!important}html body .portal-table-region{max-height:65vh}}
@media(prefers-reduced-motion:reduce){html body .portal-surface,html body .portal-nav-enhanced{transition:none!important}}
@media print{.portal-ui-tools,.portal-section-browser,.portal-table-filter{display:none!important}.portal-table-region{overflow:visible!important;max-height:none!important;border:0!important}.portal-table-region>table{min-width:0!important}.portal-table-region tr[hidden]{display:table-row!important}}
html body .portal-table-region tr[data-portal-filtered]{display:none!important}html body #mobilePrimaryNav .portal-nav-enhanced .eoc-nav-group-title{font-size:var(--portal-nav)!important;line-height:1.4!important}html body .portal-readable :is(.metric-label,.metric-card>span,.directory-list span,.badge,.secure-label,.connection-status,.status-panel strong){font-size:var(--portal-small)!important;line-height:1.5!important}html body .portal-readable .metric-card strong{font-size:calc(var(--portal-heading) + 3px)!important;line-height:1.3!important}html body .portal-readable .brand small{font-size:14px!important}html body #sitrepShared .sr-nav-label{font-size:var(--portal-nav)!important}
@media print{html body .portal-table-region tr[data-portal-filtered]{display:table-row!important}}
html body .portal-ui-tools{scroll-margin-top:235px!important}html body :is(.module-nav,.module-header,.topbar,.dpwh-topbar) :is(select,label,.back,.back-link){font-size:var(--portal-control)!important;line-height:1.45!important}html body .loading{font-size:18px!important}@media(max-width:980px){html body .portal-ui-tools{scroll-margin-top:110px!important}}
html body .portal-readable a:not(.leaflet-container *):not(.portal-ui-tools *){font-size:var(--portal-control)!important;line-height:1.5!important}html body .portal-readable :is(.news-item strong,.news-card strong,.fire-report-card-meta,.governance-card-meta,.directory-list strong){font-size:var(--portal-control)!important;line-height:1.55!important}
html body .messenger-shell .conversation-pane>.portal-ui-tools{flex-shrink:0;width:calc(100% - 20px);margin:10px!important;padding:12px!important}html body .messenger-shell .conversation-pane>.portal-section-browser{margin:0 10px 10px;flex-shrink:0}.messenger-shell .portal-section-results{max-height:220px}
html body .portal-section-results button{font-size:var(--portal-control)!important}
/* Use the browser document as the single page scroll surface. */
html.portal-document-scroll{height:auto!important;min-height:100%!important;overflow-x:clip!important;overflow-y:auto!important}
html.portal-document-scroll body{height:auto!important;min-height:100vh!important;max-height:none!important}
html.portal-document-scroll body:not(.mobile-menu-open):not(.about-info-modal-open):not(.officer-login-open):not([style*="overflow: hidden"]):not([style*="overflow:hidden"]){overflow-x:clip!important;overflow-y:visible!important}
/* Keep long desktop menus inside the viewport and scroll their items on selection. */
@media(min-width:981px){html.portal-document-scroll body .layer-top-nav.header-nav{height:calc(100dvh - var(--portal-hero-height))!important;max-height:calc(100dvh - var(--portal-hero-height))!important;overflow:hidden!important}html.portal-document-scroll body .layer-top-nav.header-nav #mobilePrimaryNav.eoc-accordion-nav{height:100%!important;max-height:100%!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-width:none}html.portal-document-scroll body .layer-top-nav.header-nav #mobilePrimaryNav::-webkit-scrollbar{display:none}}
/* Directory search stays above the table; the directory uses the entire row. */
html body #communityDrrmNetworkPage :is(#bdrrmcCardGrid,#sdrrmcCardGrid){display:block!important;width:100%!important;min-width:0!important;max-width:none!important}
html body #communityDrrmNetworkPage :is(.bdrrmc-directory-wrap,.sdrrmc-directory-wrap){display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;max-height:none!important;overflow-x:auto!important;box-sizing:border-box!important;margin:12px 0!important;grid-column:1/-1!important}
html body #communityDrrmNetworkPage .community-network-table{width:100%!important;table-layout:auto!important;font-size:var(--portal-text)!important}
html body #communityDrrmNetworkPage .bdrrmc-directory-table{min-width:900px!important}html body #communityDrrmNetworkPage .sdrrmc-directory-table{min-width:1100px!important}
html body #communityDrrmNetworkPage .community-network-table :is(th,td){font-size:var(--portal-control)!important;padding:14px!important;line-height:1.5!important;word-break:normal!important;overflow-wrap:normal!important}
html body #communityDrrmNetworkPage .community-network-table :is(a[href^="tel:"],.sdrrmc-contact-pill,.bdrrmc-contact-pill){white-space:nowrap!important;word-break:normal!important}
/* Keep the EOC navigation scrollbar visible and separate from the page scrollbar. */
html.portal-document-scroll body .layer-top-nav.header-nav #mobilePrimaryNav.eoc-accordion-nav{scrollbar-width:auto!important;scrollbar-gutter:stable!important;scrollbar-color:#59c5eb #142b40!important}
html.portal-document-scroll body .layer-top-nav.header-nav #mobilePrimaryNav::-webkit-scrollbar{display:block!important;width:12px!important}
html.portal-document-scroll body .layer-top-nav.header-nav #mobilePrimaryNav::-webkit-scrollbar-track{background:#142b40!important;border-radius:8px}
html.portal-document-scroll body .layer-top-nav.header-nav #mobilePrimaryNav::-webkit-scrollbar-thumb{background:#59c5eb!important;border:2px solid #142b40!important;border-radius:8px}
