/* Global chrome only. Layout, typography and colours are owned by Blocksy builders. */
.ct-header,
.ct-footer,
#offcanvas {
    --edga-chrome-red: var(--theme-palette-color-1, #c73434);
    --edga-chrome-ink: #1f3a4d;
    --edga-chrome-gold: #e1b84a;
}

.ct-header .ct-menu-link,
.ct-footer .ct-widget,
#offcanvas .ct-menu-link {
    overflow-wrap: anywhere;
}

.ct-header .site-branding,
.ct-footer [data-column] {
    min-width: 0;
}

.ct-header [data-id="menu-secondary"] a[href$="/membership/join/"] {
    background: var(--edga-chrome-red);
    color: #fff;
    padding-inline: 18px;
}

.ct-header .ct-header-search,
.ct-header .ct-header-trigger,
#offcanvas .ct-toggle-close,
#offcanvas .ct-toggle-dropdown-mobile {
    min-width: 44px;
    min-height: 44px;
}

.ct-header .sub-menu .ct-menu-link {
    min-height: 44px;
    white-space: normal;
}

.ct-header :where(a, button):focus-visible {
    outline: 2px solid var(--edga-chrome-red);
    outline-offset: 4px;
}

.ct-header [data-row="top"] :where(a, button):focus-visible,
.ct-footer :where(a, button):focus-visible,
#offcanvas :where(a, button):focus-visible {
    outline: 2px solid var(--edga-chrome-gold);
    outline-offset: 3px;
}

.ct-footer .widget-title {
    margin-bottom: 16px;
}

.ct-footer .widget-menu li {
    margin-bottom: 0;
}

.ct-footer .widget-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-block: 8px;
    line-height: 1.45;
    text-underline-offset: 0.22em;
}

.ct-footer .ct-social-box a {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.ct-footer-copyright p {
    max-width: 100ch;
    margin-bottom: 8px;
}

.ct-footer-copyright p:last-child {
    margin-bottom: 0;
}

#offcanvas .ct-menu-link {
    min-height: 48px;
    white-space: normal;
}

#offcanvas .ct-sub-menu-parent > .ct-menu-link {
    min-width: 0;
    flex: 1;
}

#offcanvas .ct-toggle-dropdown-mobile {
    flex-shrink: 0;
}

#offcanvas .mobile-menu > ul > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

@media (hover: hover) and (pointer: fine) {
    .ct-header [data-id="menu-secondary"] a[href$="/membership/join/"]:hover {
        background: #a92727;
        color: #fff;
    }

    .ct-footer .widget-menu a:hover {
        text-decoration: underline;
    }
}

/* Keep unusually long labels within the existing header row. */
.ct-header [data-device="desktop"] [data-row="middle"] [data-column="end"],
.ct-header [data-id="menu"] {
    min-width: 0;
    max-width: 100%;
}

.ct-header [data-id="menu"] > ul {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ct-header [data-id="menu"] > ul > li > .ct-menu-link {
    white-space: normal;
}

.ct-footer .ct-social-box a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* These eight existing links read as one compact governance/legal group. */
.ct-footer [data-column="widget-area-2"] .widget-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
}

@media (max-width: 689.98px) {
    .ct-footer [data-row="top"] .widget-title {
        font-size: 21px;
        line-height: 1.3;
        margin-bottom: 0;
    }
}

/* Make the site-search trigger readable on the navy utility bar. */
.ct-header [data-row="top"] .ct-header-search {
    color: #fff;
    --theme-icon-color: #fff;
    --theme-icon-hover-color: #fff;
    /* Blocksy resets toggle padding and borders with important declarations. */
    padding-inline: 12px !important;
    border: 1px solid #8b9ba5 !important;
    border-radius: 4px;
}
.ct-header [data-row="top"] .ct-header-search .ct-label { color: #fff; }

/* Give the existing Blocksy search panel an unmistakable input surface. */
#search-modal .ct-search-form-inner {
    background: #fff;
    border: 2px solid #7b8b95;
    border-radius: 4px;
}
#search-modal .ct-search-form input[type="search"] {
    color: #1f3a4d;
    caret-color: #1f3a4d;
    background: transparent;
    font-size: 18px;
}
#search-modal .ct-search-form input[type="search"]::placeholder { color: #536575; opacity: 1; }
#search-modal .ct-search-form-inner:focus-within { border-color: #e1b84a; outline: 2px solid #e1b84a; outline-offset: 4px; }
#search-modal :where(button, a):focus-visible { outline: 2px solid #e1b84a; outline-offset: 4px; }
