/* MarineIntel shared header and footer refresh — 2026 */
:root {
    --mi-navy-950: #0c2b43;
    --mi-navy-900: #123d5b;
    --mi-navy-800: #1a4e70;
    --mi-blue: #49a9d3;
    --mi-cyan: #83d8ed;
    --mi-ice: #f0faff;
    --mi-muted: #b7cfdd;
    --mi-line: rgba(205, 235, 249, 0.24);
    --mi-shadow: 0 14px 40px rgba(12, 43, 67, 0.18);
}

/* The live map is a page section, not the page background. */
body.mi-map-page {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: #eef4f7;
}

.mi-map-page #mapsec {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: #eef4f7;
}

.mi-map-page .middle-wrapper {
    width: 100%;
    max-width: none;
}

.mi-page-header {
    position: relative;
    z-index: 1002;
    flex: 0 0 auto;
    background: var(--mi-navy-900);
}

.mi-map-page .mi-site-header {
    width: 100%;
    max-width: none;
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: 0 8px 28px rgba(12, 43, 67, 0.16);
}

.mi-map-frame {
    position: relative;
    flex: 0 0 auto;
    width: calc(100% - 36px);
    height: clamp(560px, calc(100vh - 92px), 900px);
    margin: 18px auto 0;
    overflow: hidden;
    border: 1px solid #c3d5df;
    border-radius: 16px;
    background: #dce8ee;
    box-shadow: 0 14px 38px rgba(16, 55, 80, 0.14);
}

.mi-map-frame #map {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
}

.mi-map-frame #formsection {
    position: absolute;
    top: 18px;
    left: 18px;
    width: min(330px, calc(100% - 36px));
    height: 48px;
    margin: 0;
    padding: 0 48px 0 15px;
    border: 1px solid rgba(174, 222, 241, 0.72);
    border-radius: 12px;
    background: linear-gradient(135deg, #245b7b, #2f6f91);
    box-shadow: 0 12px 28px rgba(9, 42, 62, 0.22);
    transition: border-color 160ms ease, box-shadow 160ms ease;
    z-index: 1000;
}

.mi-map-frame #formsection:focus-within {
    border-color: #b9ecf8;
    box-shadow: 0 0 0 3px rgba(131, 216, 237, 0.2), 0 12px 28px rgba(9, 42, 62, 0.22);
}

.mi-map-frame #search {
    position: static;
    display: block;
    width: 100%;
    height: 46px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.mi-map-frame #search::placeholder {
    color: rgba(239, 250, 255, 0.78);
}

.mi-map-frame #formsections,
.mi-map-frame #formTextClear {
    top: 3px;
    right: 3px;
    width: 40px;
    height: 40px;
    padding: 12px;
    border-radius: 9px;
    color: #effaff;
    background: rgba(255, 255, 255, 0.11);
}

.mi-map-frame #formTextClear {
    right: 45px;
}

.mi-map-frame #shareMapBtn {
    top: 78px;
    left: 18px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(174, 222, 241, 0.7);
    border-radius: 10px;
    background: #2f6f91;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(9, 42, 62, 0.18);
}

.mi-map-frame #shareMapBtn:hover {
    background: #3c82a4;
    color: #fff;
}

.mi-map-frame .feature {
    position: absolute;
    top: 128px;
    left: 18px;
    width: 0;
    height: auto;
    padding: 0;
}

.mi-map-frame .dropdown-check-list .anchor,
.mi-map-frame #reset {
    border-color: #245b7b;
    background: #245b7b;
}

.mi-map-frame #reset-parent {
    top: 18px;
}

.mi-site-header,
.mi-site-footer {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.mi-site-header {
    position: relative;
    z-index: 1002;
    width: calc(100% - 40px);
    max-width: 1700px;
    min-height: 72px;
    margin: 18px auto 0;
    border: 1px solid var(--mi-line);
    border-radius: 18px;
    background: linear-gradient(112deg, rgba(18, 61, 91, 0.99), rgba(26, 78, 112, 0.97));
    box-shadow: var(--mi-shadow);
    backdrop-filter: blur(18px) saturate(135%);
}

.mi-header-shell {
    max-width: 1660px;
    padding: 0 18px;
}

.mi-site-header .navbar {
    min-height: 70px;
    padding: 0;
    background: transparent !important;
}

.mi-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 220px;
    margin-right: 26px;
    color: #fff;
    text-decoration: none !important;
}

.mi-brand img {
    display: block;
    width: 142px;
    height: auto;
    max-height: 43px;
    object-fit: contain;
}

.mi-brand-copy {
    display: grid;
    gap: 2px;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid var(--mi-line);
    line-height: 1.1;
}

.mi-brand-copy small {
    color: var(--mi-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mi-brand-copy strong {
    color: var(--mi-ice);
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.mi-site-header .navbar-collapse {
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.mi-primary-nav {
    align-items: center;
    gap: 2px;
}

.mi-site-header .navbar-dark .navbar-nav .nav-link,
.mi-site-header .navbar-dark .navbar-nav .nav-link:focus {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 10px 10px;
    border-radius: 10px;
    color: #c4d9e7;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.mi-site-header .navbar-dark .navbar-nav .nav-link:hover,
.mi-site-header .navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.mi-site-header .navbar-dark .navbar-nav .mi-map-action {
    margin-right: 5px;
    background: rgba(43, 168, 224, 0.16);
    color: #bdeeff;
    box-shadow: inset 0 0 0 1px rgba(101, 216, 244, 0.2);
}

.mi-site-header .area-active {
    color: #fff !important;
    background: rgba(43, 168, 224, 0.2) !important;
}

.mi-site-header .dropdown-menu {
    min-width: 215px;
    margin-top: 12px;
    padding: 8px;
    border: 1px solid var(--mi-line);
    border-radius: 13px;
    background: rgba(18, 61, 91, 0.99);
    box-shadow: 0 20px 50px rgba(0, 10, 22, 0.32);
}

.mi-site-header .dropdown-item {
    padding: 9px 11px;
    border-radius: 8px;
    color: #c8dce9;
    font-size: 12px;
}

.mi-site-header .dropdown-item:hover,
.mi-site-header .dropdown-item:focus {
    color: #fff !important;
    background: rgba(43, 168, 224, 0.16) !important;
}

.mi-site-header .dropdown-divider {
    border-top-color: var(--mi-line);
}

.mi-header-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid var(--mi-line);
}

.mi-emergent-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--mi-muted) !important;
    text-decoration: none !important;
    line-height: 1;
    transition: background 160ms ease, color 160ms ease;
}

.mi-emergent-link span {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mi-emergent-link strong {
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.08em;
}

.mi-emergent-link i {
    font-size: 8px;
}

.mi-emergent-link:hover {
    color: var(--mi-cyan) !important;
    background: rgba(255, 255, 255, 0.06);
}

.mi-member-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 11px;
    background: var(--mi-ice);
    color: var(--mi-navy-950) !important;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.mi-member-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(101, 216, 244, 0.18);
}

.mi-account-icon,
.mi-icon-link {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--mi-line);
    border-radius: 11px;
    color: #d9edf8 !important;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none !important;
}

.mi-account-icon:hover,
.mi-icon-link:hover {
    color: #fff !important;
    background: rgba(43, 168, 224, 0.18);
}

.mi-site-header .navbar-toggler {
    width: 42px;
    height: 42px;
    padding: 5px;
    border: 1px solid var(--mi-line);
    border-radius: 11px;
}

.mi-site-header .refresh-mobile {
    display: none;
    margin-left: auto;
    margin-right: 8px;
    padding: 0;
}

/* The map used a 105px two-tier header; keep controls aligned with the slimmer shell. */
#shareMapBtn {
    top: 105px;
}

/* Footer */
.footer.mi-site-footer {
    position: relative;
    z-index: 997;
    margin-top: 18px;
    padding: 0;
    border-top: 1px solid rgba(101, 216, 244, 0.22);
    border-radius: 0;
    color: #fff;
    background:
        radial-gradient(circle at 83% 0%, rgba(73, 169, 211, 0.18), transparent 28%),
        linear-gradient(112deg, var(--mi-navy-950), var(--mi-navy-900));
    box-shadow: 0 -18px 45px rgba(0, 16, 32, 0.12);
}

.mi-footer-shell {
    display: grid;
    grid-template-columns: minmax(270px, 1.25fr) auto minmax(280px, 1fr);
    align-items: center;
    gap: 34px;
    max-width: 1520px;
    min-height: 88px;
    margin: 0 auto;
    padding: 15px 28px;
}

.mi-footer-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.mi-footer-brand > a {
    display: inline-flex;
    flex: 0 0 auto;
}

.mi-footer-brand img {
    display: block;
    width: 145px;
    max-height: 42px;
    object-fit: contain;
}

.mi-footer-brand > span {
    max-width: 235px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--mi-line);
    color: var(--mi-muted);
    font-size: 11px;
    line-height: 1.45;
}

.mi-footer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.mi-footer-nav a {
    padding: 8px 10px;
    border-radius: 9px;
    color: #bfd4e2;
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease;
}

.mi-footer-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.mi-footer-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.mi-footer-group-label {
    color: #7f9db2;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.mi-footer-group a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 7px 10px;
    border: 1px solid var(--mi-line);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.96);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.mi-footer-group a:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 25px rgba(43, 168, 224, 0.17);
}

.mi-footer-group img {
    display: block;
    width: 156px;
    height: 29px;
    object-fit: contain;
}

.mi-footer-group i {
    color: #0b668f;
    font-size: 9px;
}

.mi-footer-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 20px;
    border-top: 1px solid rgba(188, 226, 248, 0.1);
    color: #7896aa;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mi-footer-dot {
    width: 3px;
    height: 3px;
    margin: 0 10px;
    border-radius: 50%;
    background: var(--mi-cyan);
    box-shadow: 0 0 8px rgba(101, 216, 244, 0.65);
}

@media (max-width: 1390px) {
    .mi-brand-copy,
    .mi-emergent-link span {
        display: none;
    }

    .mi-brand {
        min-width: 150px;
        margin-right: 15px;
    }

    .mi-primary-nav {
        gap: 0;
    }

    .mi-site-header .navbar-dark .navbar-nav .nav-link,
    .mi-site-header .navbar-dark .navbar-nav .nav-link:focus {
        padding-right: 8px;
        padding-left: 8px;
    }
}

@media (max-width: 1199.98px) {
    .mi-site-header {
        width: calc(100% - 28px);
        margin-top: 14px;
    }

    .mi-site-header .navbar {
        min-height: 64px;
    }

    .mi-brand-copy {
        display: grid;
    }

    .mi-site-header .navbar-collapse {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        max-height: calc(100vh - 104px);
        overflow-y: auto;
        padding: 12px;
        border: 1px solid var(--mi-line);
        border-radius: 15px;
        background: rgba(18, 61, 91, 0.99);
        box-shadow: var(--mi-shadow);
    }

    .mi-primary-nav {
        align-items: stretch;
        gap: 3px;
    }

    .mi-site-header .navbar-dark .navbar-nav .nav-link,
    .mi-site-header .navbar-dark .navbar-nav .nav-link:focus {
        width: 100%;
        min-height: 40px;
        padding: 10px 12px;
    }

    .mi-site-header .dropdown-menu {
        margin: 4px 0 6px;
        box-shadow: none;
    }

    .mi-header-actions {
        flex-wrap: wrap;
        margin: 10px 0 0;
        padding: 12px 0 0;
        border-top: 1px solid var(--mi-line);
        border-left: 0;
    }

    .mi-emergent-link span {
        display: inline;
    }

    .mi-site-header .refresh-web {
        display: none !important;
    }

    .mi-site-header .refresh-mobile {
        display: inline-grid;
    }

    .mi-footer-shell {
        grid-template-columns: 1fr 1fr;
        gap: 16px 28px;
    }

    .mi-footer-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
        padding-top: 10px;
        border-top: 1px solid rgba(188, 226, 248, 0.1);
    }
}

@media (max-width: 767.98px) {
    .mi-site-header {
        width: calc(100% - 20px);
        margin-top: 10px;
        border-radius: 14px;
    }

    .mi-map-page .mi-site-header {
        width: 100%;
        margin: 0;
        border-radius: 0;
    }

    .mi-map-frame {
        width: calc(100% - 20px);
        height: max(520px, calc(100svh - 76px));
        margin-top: 10px;
        border-radius: 13px;
    }

    .mi-map-frame #formsection {
        top: 12px;
        left: 12px;
        width: calc(100% - 24px);
    }

    .mi-map-frame #shareMapBtn {
        top: 72px;
        left: 12px;
    }

    .mi-map-frame .feature {
        top: 120px;
        left: 12px !important;
    }

    .mi-map-frame #reset-parent {
        top: 12px;
    }

    .mi-header-shell {
        padding: 0 11px;
    }

    .mi-brand {
        min-width: 0;
        margin-right: 8px;
    }

    .mi-brand img {
        width: 123px;
    }

    .mi-brand-copy {
        display: none;
    }

    .mi-footer-shell {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 20px;
    }

    .mi-footer-brand {
        justify-content: center;
    }

    .mi-footer-brand > span {
        max-width: 180px;
    }

    .mi-footer-nav {
        order: 3;
        flex-wrap: wrap;
        padding-top: 12px;
    }

    .mi-footer-group {
        justify-content: center;
    }

    .mi-footer-group-label {
        white-space: normal;
    }
}

@media (max-width: 420px) {
    .mi-footer-brand > span {
        display: none;
    }

    .mi-footer-group {
        flex-direction: column;
        gap: 7px;
    }

    .mi-footer-meta {
        flex-wrap: wrap;
        row-gap: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mi-site-header *,
    .mi-site-footer * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
