﻿/* Portal.Master chrome (MyBNZ Portal + Building/Zoning/Public Works applications).
   Added 2026-11-10. Uses the same theme variables as the main site (css/root-colors/*.css),
   so the portal follows whichever color theme the visitor picked.
   Every portal-chrome class is prefixed "pm-" so it can't collide with page styles
   (application-redesign.css already uses .portal-page / .portal-heading).
   Rollback: _backup/2026-11-10-portal-master/ROLLBACK.ps1 */

/* ---------- Base (mirrors the critical inline CSS in Site.Master) ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body.pm-body {
    font-family: 'Inter', system-ui, sans-serif; line-height: 1.7; font-size: 16.5px;
    color: var(--text); background: var(--sand, #f8f7f2);
    min-height: 100vh; display: flex; flex-direction: column;
}
body.pm-body > form { flex: 1 0 auto; display: flex; flex-direction: column; }
.container-fluid { padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; }
.row { margin-right: -15px; margin-left: -15px; }
.row:before, .row:after { content: " "; display: table; }
.row:after { clear: both; }
.col-xs-12, .col-sm-4, .col-sm-6, .col-md-2, .col-md-3, .col-md-4, .col-md-6, .col-md-10, .col-md-12, .col-lg-3 {
    position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px;
}
.col-xs-12 { float: left; width: 100%; }
@media (min-width: 768px) {
    .col-sm-4 { float: left; width: 33.33333333%; }
    .col-sm-6 { float: left; width: 50%; }
}
@media (min-width: 992px) {
    .col-md-2, .col-md-3, .col-md-4, .col-md-6, .col-md-10, .col-md-12 { float: left; }
    .col-md-2 { width: 16.66666667%; }
    .col-md-3 { width: 25%; }
    .col-md-4 { width: 33.33333333%; }
    .col-md-6 { width: 50%; }
    .col-md-10 { width: 83.33333333%; }
    .col-md-12 { width: 100%; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hp-container { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pm-skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 2000;
    padding: 10px 16px; border-radius: 8px; background: #fff; color: var(--green-dark);
    font-weight: 700; text-decoration: none; box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.pm-skip-link:focus { top: 12px; }

.pm-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.pm-header { position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 18px rgba(10,40,28,.18); }
.pm-topbar { background: var(--green-dark); color: #fff; }
.pm-topbar .pm-wrap { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.pm-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pm-logo-link { display: block; flex: none; border-radius: 6px; }
.pm-logo {
    display: block; flex: none; width: 168px; height: 56px;
    background-image: var(--logo-url); background-size: contain; background-repeat: no-repeat; background-position: left center;
}
.pm-brand-text { display: flex; flex-direction: column; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.28); line-height: 1.2; min-width: 0; color: #fff; text-decoration: none; }
.pm-brand-title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: #fff; white-space: nowrap; }
.pm-brand-sub { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #f3dc8f; white-space: nowrap; }
.pm-brand-text:hover .pm-brand-title, .pm-brand-text:focus-visible .pm-brand-title { text-decoration: underline; }

.pm-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.pm-tool-link, a.pm-tool-link, .pm-tools a.pm-btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 999px;
    font-size: 14.5px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
    color: #fff; border: 1px solid rgba(255,255,255,.32); background: rgba(255,255,255,.06);
    transition: background-color .15s ease, border-color .15s ease;
}
.pm-tool-link:hover, .pm-tool-link:focus-visible, .pm-tools a.pm-btn:hover, .pm-tools a.pm-btn:focus-visible {
    background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.6); color: #fff;
}
.pm-tools a.pm-tool-link.pm-active { background: rgba(255,255,255,.2); border-color: #fff; }
.pm-tools a.pm-btn-solid { background: #fff; color: var(--green-dark); border-color: #fff; }
.pm-tools a.pm-btn-solid:hover, .pm-tools a.pm-btn-solid:focus-visible { background: var(--sand, #f8f7f2); color: var(--green-dark); }
.pm-account { display: inline-flex; align-items: center; gap: 10px; }
.pm-account-who { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; font-size: 14px; color: rgba(255,255,255,.92); }
.pm-account-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-topbar a:focus-visible { outline: 3px solid #f3dc8f; outline-offset: 2px; }

/* ---------- Portal navigation ---------- */
.pm-nav { background: #fff; border-bottom: 1px solid #dbe5e0; }
.pm-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: thin; }
.pm-nav li { flex: none; }
.pm-nav a {
    position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 14px 14px 13px;
    font-size: 15px; font-weight: 600; color: #3a4a5c; text-decoration: none; white-space: nowrap;
}
.pm-nav a i { color: var(--green); font-size: 15px; }
.pm-nav a::after {
    content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
    background: transparent; transition: background-color .15s ease;
}
.pm-nav a:hover { color: var(--green-dark); }
.pm-nav a:hover::after { background: #cfe0d7; }
.pm-nav a.pm-active { color: var(--green-dark); }
.pm-nav a.pm-active::after { background: var(--green); }
.pm-nav a:focus-visible { outline: 3px solid var(--green-light); outline-offset: -3px; border-radius: 6px; }

/* ---------- Main ---------- */
/* Side padding matches Site.Master's main.container-fluid so page-level .row negative margins don't overflow. */
.pm-main { flex: 1 0 auto; width: 100%; padding: 28px 15px 24px; }
.pm-main:focus { outline: none; }
.pm-page-intro:not(:has(*)) { display: none; }
.pm-page-intro { max-width: 1080px; margin: 0 auto 12px; padding: 0 16px; }
/* ---------- Footer ---------- */
.pm-footer { margin-top: 40px; background: var(--green-dark); color: rgba(255,255,255,.85); font-size: 14.5px; }
.pm-footer .pm-wrap { padding-top: 36px; padding-bottom: 20px; }
.pm-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.pm-footer h2 { margin: 0 0 12px; font-family: 'Inter', system-ui, sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #f3dc8f; }
.pm-footer p { margin: 0 0 10px; line-height: 1.6; }
.pm-footer ul { list-style: none; margin: 0; padding: 0; }
.pm-footer li { margin: 0 0 8px; }
.pm-footer a { color: #fff; text-decoration: none; }
.pm-footer a:hover, .pm-footer a:focus-visible { text-decoration: underline; }
.pm-footer a:focus-visible { outline: 3px solid #f3dc8f; outline-offset: 2px; }
.pm-footer-home { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.pm-footer-bottom { margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.18); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.7); }

/* Contact details belong to the footer; keep their hierarchy distinct from link columns. */
.pm-footer .pm-contact { margin: 0 0 30px; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.18); }
.pm-footer .pm-contact-intro { margin-bottom: 20px; }
.pm-footer .pm-contact-title { margin: 0 0 6px; font-size: 23px; font-weight: 700; letter-spacing: -.02em; text-transform: none; color: #fff; }
.pm-footer .pm-contact-intro p { margin: 0; color: rgba(255,255,255,.8); }
.pm-contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pm-contact-card { min-width: 0; padding: 22px 24px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; }
.pm-footer .pm-contact-card h3 { margin: 0 0 16px; font-family: 'Inter', system-ui, sans-serif; font-size: 17px; font-weight: 700; line-height: 1.4; color: #f3dc8f; }
.pm-footer .pm-contact-list { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.pm-footer .pm-contact-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: baseline; margin: 0; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.pm-contact-list i { color: #f3dc8f; text-align: center; }
.pm-footer .pm-contact-list a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 3px; }
.pm-footer .pm-contact-list a:hover, .pm-footer .pm-contact-list a:focus-visible { text-decoration-color: currentColor; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .pm-footer-grid { grid-template-columns: 1fr 1fr; }
    .pm-account-who { display: none; }
}
@media (max-width: 767px) {
    .pm-wrap { padding: 0 14px; }
    .pm-topbar .pm-wrap { min-height: 60px; gap: 10px; }
    .pm-logo { width: 120px; height: 40px; }
    .pm-brand { gap: 10px; }
    .pm-brand-text { padding-left: 10px; }
    .pm-brand-title { font-size: 16px; }
    .pm-brand-sub { display: none; }
    .pm-tool-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .pm-tool-link, a.pm-tool-link, .pm-tools a.pm-btn { padding: 8px 11px; }
    .pm-nav a { padding: 12px 11px 11px; font-size: 14.5px; }
    .pm-main { padding-top: 18px; }
    .pm-footer-grid { grid-template-columns: 1fr; gap: 22px; }
    .pm-contact-grid { grid-template-columns: 1fr; gap: 14px; }
    .pm-contact-card { padding: 18px; }
}
@media (max-width: 420px) {
    .pm-logo-link { display: none; }
    .pm-brand-text { padding-left: 0; border-left: 0; }
}

@media print {
    .pm-header, .pm-footer, .pm-contact, .pm-skip-link { display: none !important; }
    body.pm-body { background: #fff; }
}
