/* ===========================================================================
   Accessibility fixes (WCAG 2.1 AA).
   Linked last in _Layout.cshtml so these rules win over styles.css and
   NewDesign.css on specificity ties.
   =========================================================================== */

/* --- 1.4.11 Non-text Contrast --------------------------------------------
   The component borders come from Bootstrap's own custom properties, which
   default to #dee2e6 and #a09d9d - between 1.3:1 and 2.7:1 against white, so
   the edge of an accordion item or a bordered column was not discernible.
   Redefining the two variables lifts every component that derives from them
   in one place. #767676 is 4.5:1 on white.                                   */
:root {
    --bs-border-color: #767676;
    --bs-border-color-translucent: #767676;
    --bs-accordion-border-color: #767676;
}

/* Belt and braces for the components that set the colour directly rather
   than through the variable. */
.accordion-item,
.accordion-button,
.card,
.list-group-item,
.table > :not(caption) > * > * {
    border-color: #767676;
}

/* The accordion keeps resolving to #a09d9d (2.7:1) from a rule that outranks
   both the variable and the plain declaration above, so this one is marked
   important to reach it. */
.accordion-item,
.accordion-item:first-of-type,
.accordion-item:last-of-type,
.accordion-item:not(:first-of-type) {
    border-color: #767676 !important;
}

/* The divider under each side-menu item is #bbb, 1.9:1 on its background. */
.MenuBA a,
.list-unstyled li a {
    border-bottom-color: #767676;
}


/* ---------------------------------------------------------------------------
   Controls that were <a> elements and are now <button> elements.
   Purely to keep the original appearance - no visual change is intended.
   --------------------------------------------------------------------------- */

/* Footer "Read More" disclosure. */
button.readmore {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

/* Side-menu submenu toggles ("BA Dashboard"). The list styling targets
   `li > a`; these selectors extend the same look to the button. */
.list-unstyled li > button.submenu-toggle {
    display: block;
    width: 100%;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    text-align: left;
    color: #000;
    cursor: pointer;
}

/* Account menu trigger in the header. */
button#dropdownToggle {
    text-align: inherit;
}

/* ---------------------------------------------------------------------------
   Scrolling notice. Replaces <marquee>, which is a deprecated element that
   browsers flag, cannot be paused from the keyboard and ignores a reduced-motion
   preference. Same direction, same speed, same pause-on-hover behaviour - it now
   also pauses on keyboard focus and stops entirely for users who ask for less
   motion (WCAG 2.2.2).
   --------------------------------------------------------------------------- */
.iz-marquee {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.iz-marquee > span {
    display: inline-block;
    padding-left: 100%;
    will-change: transform;
    animation: iz-marquee-scroll 20s linear infinite;
}

.iz-marquee:hover > span,
.iz-marquee:focus-within > span {
    animation-play-state: paused;
}

@keyframes iz-marquee-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .iz-marquee {
        overflow-x: auto;
    }

    .iz-marquee > span {
        padding-left: 0;
        animation: none;
    }
}

/* --- 2.5.8 Target Size (Minimum) ------------------------------------------
   The footer link columns are injected into #data-container by the shared
   investmentz.com Layout.js as bare <li><a> rows, so each link was only one
   line of text tall and touched its neighbours. Give every link at least a
   24x24px hit area and a little space between rows. */
#data-container li {
    margin-bottom: 0.25rem;
}

#data-container li > a {
    display: inline-block;
    min-height: 24px;
    min-width: 24px;
    padding: 2px 0;
    line-height: 20px;
}
