/* MiPA accessibility toolbar & options panel (public site) */

/* Header top bar: toll free left; language + accessibility + login right */
.main-header .header-top .mipa-header-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    min-height: 40px;
    padding: 4px 0;
}

.main-header .header-top .mipa-header-top-left,
.main-header .header-top .mipa-header-top-right {
    float: none !important;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin: 0 !important;
    padding: 0;
    width: auto !important;
    list-style: none;
}

.main-header .header-top .mipa-header-top-left li,
.main-header .header-top .mipa-header-top-right > li {
    display: flex;
    align-items: center;
    margin: 0 !important;
    float: none;
    vertical-align: middle;
    line-height: 1.3;
}

.main-header .header-top .mipa-header-top-right {
    margin-left: auto !important;
    justify-content: flex-end;
}

.main-header .header-top .mipa-a11y-panel-wrap {
    display: flex;
    align-items: center;
    position: relative;
}

.main-header .header-top .mipa-a11y-menu-trigger {
    margin: 0;
    align-self: center;
}

.main-header .header-top .mipa-header-top-language #google_translate_element,
.main-header .header-top .mipa-header-top-language .goog-te-gadget-simple {
    margin-top: 0 !important;
    display: inline-flex;
    align-items: center;
}

.main-header .header-top .mipa-header-top-right .language .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
}

/* Override theme responsive rules that center the whole top bar on all widths */
.main-header.style-four .header-top .mipa-header-top-bar .mipa-header-top-left,
.main-header.style-four .header-top .mipa-header-top-bar .mipa-header-top-right,
.main-header.style-six .header-top .mipa-header-top-bar .mipa-header-top-left,
.main-header.style-six .header-top .mipa-header-top-bar .mipa-header-top-right {
    display: flex !important;
    float: none !important;
    text-align: left;
    margin-bottom: 0 !important;
}

.main-header.style-four .header-top .mipa-header-top-bar .mipa-header-top-right > li:last-child,
.main-header.style-six .header-top .mipa-header-top-bar .mipa-header-top-right > li:last-child {
    margin-left: 0 !important;
}

.mipa-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 1000001;
    padding: 12px 18px;
    background: #164976;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 6px 6px;
}

.mipa-skip-link:focus {
    left: 12px;
    top: 0;
    width: auto;
    height: auto;
    overflow: visible;
}

.mipa-a11y-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(22, 73, 118, 0.35);
    background: #fff;
    color: #164976;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    height: 30px;
    padding: 0 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mipa-a11y-menu-trigger--icon-only {
    width: 34px;
    min-width: 34px;
    padding: 0;
}

.mipa-a11y-menu-trigger i {
    font-size: 18px;
    line-height: 1;
}

.mipa-a11y-menu-trigger:hover,
.mipa-a11y-menu-trigger:focus {
    background: #164976;
    color: #fff;
    border-color: #164976;
    outline: 2px solid #0f7f8f;
    outline-offset: 1px;
}

.mipa-a11y-menu-trigger[aria-expanded="true"] {
    background: #164976;
    color: #fff;
}

.mipa-a11y-btn {
    border: 1px solid rgba(22, 73, 118, 0.35);
    background: #fff;
    color: #164976;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    min-width: 40px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.mipa-a11y-btn:hover,
.mipa-a11y-btn:focus {
    background: #164976;
    color: #fff;
    border-color: #164976;
    outline: 2px solid #0f7f8f;
    outline-offset: 1px;
}

.mipa-a11y-btn[aria-pressed="true"] {
    background: #164976;
    color: #fff;
}

.mipa-a11y-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.mipa-a11y-font-size-block {
    padding-bottom: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid #eef2f6;
}

.mipa-a11y-font-size-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a2b3c;
    margin-bottom: 10px;
}

.mipa-a11y-font-size-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mipa-a11y-font-size-status {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #546879;
    text-align: center;
}

.mipa-a11y-panel-wrap {
    position: relative;
}

.mipa-a11y-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(380px, calc(100vw - 24px));
    background: #fff;
    border: 1px solid #c5d4e3;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(22, 73, 118, 0.18);
    z-index: 1000000;
    padding: 0;
}

.mipa-a11y-panel.is-open {
    display: block;
}

.mipa-a11y-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: linear-gradient(135deg, #192d66 0%, #164976 100%);
    color: #fff;
    border-radius: 8px 8px 0 0;
}

.mipa-a11y-panel-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.mipa-a11y-panel-close {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.mipa-a11y-panel-body {
    padding: 10px 14px 14px;
}

.mipa-a11y-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    /* padding-bottom: 12px; */
    /* margin-bottom: 4px; */
    border-bottom: 1px solid #d1dbe5;
}

    .mipa-a11y-options-grid .mipa-a11y-option {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 4px 10px;
        border-bottom: none;
        font-size: 14px;
        color: #1a2b3c;
        border: 1px solid #d9e6fa;
        border-radius: 8px;
    }

.mipa-a11y-options-grid .mipa-a11y-option span {
    line-height: 1.25;
    min-height: 1.5em;
}

.mipa-a11y-options-grid .mipa-a11y-option--wide {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mipa-a11y-options-grid .mipa-a11y-option--wide span {
    min-height: 0;
}

.mipa-a11y-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: #1a2b3c;
}

.mipa-a11y-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-bottom: 2px;
}

.mipa-a11y-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.mipa-a11y-toggle-slider {
    position: absolute;
    inset: 0;
    background: #b8c5d4;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mipa-a11y-toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.mipa-a11y-toggle input:checked + .mipa-a11y-toggle-slider {
    background: #164976;
}

.mipa-a11y-toggle input:focus + .mipa-a11y-toggle-slider {
    outline: 2px solid #0f7f8f;
    outline-offset: 2px;
}

.mipa-a11y-toggle input:checked + .mipa-a11y-toggle-slider::before {
    transform: translateX(20px);
}

.mipa-a11y-reset-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    background: #0f7f8f;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.mipa-a11y-reset-btn:hover,
.mipa-a11y-reset-btn:focus {
    background: #0b6a78;
    outline: 2px solid #164976;
    outline-offset: 2px;
}

/* Applied settings — zoom scales px/rem content (e.g. Home.aspx inline styles) */
html[data-mipa-a11y-font-step="-2"],
html.mipa-a11y-font-step--2 {
    zoom: 0.875;
}

html[data-mipa-a11y-font-step="-1"],
html.mipa-a11y-font-step--1 {
    zoom: 0.9375;
}

html[data-mipa-a11y-font-step="1"],
html.mipa-a11y-font-step-1 {
    zoom: 1.0625;
}

html[data-mipa-a11y-font-step="2"],
html.mipa-a11y-font-step-2 {
    zoom: 1.1875;
}

html[data-mipa-a11y-font-step="3"],
html.mipa-a11y-font-step-3 {
    zoom: 1.3125;
}

@supports not (zoom: 1) {
    html[data-mipa-a11y-font-step="-2"] body.boxed_wrapper {
        transform: scale(0.875);
        transform-origin: top center;
        width: 114.29%;
    }

    html[data-mipa-a11y-font-step="-1"] body.boxed_wrapper {
        transform: scale(0.9375);
        transform-origin: top center;
        width: 106.67%;
    }

    html[data-mipa-a11y-font-step="1"] body.boxed_wrapper {
        transform: scale(1.0625);
        transform-origin: top center;
        width: 94.12%;
    }

    html[data-mipa-a11y-font-step="2"] body.boxed_wrapper {
        transform: scale(1.1875);
        transform-origin: top center;
        width: 84.21%;
    }

    html[data-mipa-a11y-font-step="3"] body.boxed_wrapper {
        transform: scale(1.3125);
        transform-origin: top center;
        width: 76.19%;
    }
}

html.mipa-a11y-readable-font,
html.mipa-a11y-readable-font body {
    font-family: Arial, Helvetica, sans-serif !important;
}

html.mipa-a11y-highlight-links a {
    outline: 2px solid #ff9800 !important;
    outline-offset: 2px;
}

html.mipa-a11y-underline-links a {
    text-decoration: underline !important;
}

/* Big accessibility cursors (48px pointer) */
html.mipa-a11y-cursor-white,
html.mipa-a11y-cursor-white *,
html.mipa-a11y-cursor-white *::before,
html.mipa-a11y-cursor-white *::after {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 32 32'%3E%3Cpath d='M5 2v24l8-7 6 11 5-3-7-11h11z' fill='%23ffffff' stroke='%23000000' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 5 2, auto !important;
}

html.mipa-a11y-cursor-black,
html.mipa-a11y-cursor-black *,
html.mipa-a11y-cursor-black *::before,
html.mipa-a11y-cursor-black *::after {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 32 32'%3E%3Cpath d='M5 2v24l8-7 6 11 5-3-7-11h11z' fill='%23000000' stroke='%23ffffff' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 5 2, auto !important;
}

html.mipa-a11y-grayscale {
    filter: grayscale(100%);
}

html.mipa-a11y-high-contrast {
    filter: none;
}

html.mipa-a11y-high-contrast body {
    background: #000 !important;
    color: #fff !important;
}

html.mipa-a11y-high-contrast body a {
    color: #ffeb3b !important;
}

html.mipa-a11y-high-contrast body .main-header,
html.mipa-a11y-high-contrast body .header-top,
html.mipa-a11y-high-contrast body .header-upper,
html.mipa-a11y-high-contrast body .header-bottom,
html.mipa-a11y-high-contrast body .main-footer {
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}

html.mipa-a11y-high-contrast body .main-header a,
html.mipa-a11y-high-contrast body .main-footer a {
    color: #ffeb3b !important;
}

html.mipa-a11y-high-contrast body .mipa-a11y-btn,
html.mipa-a11y-high-contrast body .mipa-a11y-menu-trigger {
    background: #000 !important;
    color: #ffeb3b !important;
    border-color: #ffeb3b !important;
}

@media screen and (max-width: 400px) {
    .mipa-a11y-options-grid {
        grid-template-columns: 1fr;
    }

    .mipa-a11y-options-grid .mipa-a11y-option span {
        min-height: 0;
    }
}

@media screen and (max-width: 768px) {
    .main-header .header-top .mipa-header-top-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .main-header .header-top .mipa-header-top-left,
    .main-header .header-top .mipa-header-top-right {
        justify-content: center;
        margin-left: 0 !important;
    }

    .mipa-a11y-panel {
        right: auto;
        left: 0;
    }
}
