/*
 * Accessibility fixes (WCAG 2.1 AA) — loaded last in front layout so it wins over theme CSS.
 * See the November 2026 ADA audit. Brand hues are kept, only shaded where contrast fell below 4.5:1.
 */

/* --- Skip link (WCAG 2.4.1) ------------------------------------------- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100000;
    padding: 12px 20px;
    background: #0f3450;
    color: #ffffff !important;
    font-weight: 500;
    border-radius: 0 0 6px 6px;
    text-decoration: underline;
}
.skip-link:focus {
    top: 0;
}

/* --- Visible keyboard focus (WCAG 2.4.7) ------------------------------- */
/* :focus-visible only fires for keyboard users, so mouse clicks look unchanged. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid #0077b6 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 5px #ffffff !important;
}
#main-content:focus {
    outline: none;
}

/* --- Links inside running text must not rely on color (WCAG 1.4.1) ---- */
.blog-article-body a:not(.btn),
.pagecontentimg a:not(.btn),
.usacontactcontent .col-md-6 > a:not(.btn),
.usacontactcontent .col-md-6 p a:not(.btn),
.colombiacontactcontent .col-md-6 > a:not(.btn),
.colombiacontactcontent .col-md-6 p a:not(.btn) {
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

/* --- Color contrast (WCAG 1.4.3) --------------------------------------- */
/* Cyan outline buttons: #00a1e4 on white was 2.9:1. Hover keeps the brand cyan fill. */
.marinex-btn-cyan:not(:hover),
.marinex-btn-cyan-outline:not(:hover),
.marinex-mobile-action-link.track {
    color: #0077b6 !important;
    border-color: #0077b6 !important;
}

/* Quick quote form: slate #64748b on light grey was 3.9–4.3:1. */
.marinex-step-segment:not(.active):not(.completed),
.marinex-submode-btn:not(.active) span,
.marinex-chip:not(.active) {
    color: #475569 !important;
}

/* Placeholder text in the contact form and tracking box (#828282 was 3.6–3.8:1). */
#contactForm input::placeholder,
#contactForm textarea::placeholder,
.dsv-track-input::placeholder {
    color: #6b6b6b !important;
    opacity: 1;
}
#contactForm select {
    color: #6b6b6b;
}

/* Bootstrap success green #28a745 was 3.1:1. */
.text-success {
    color: #1e7e34 !important;
}

/* Blog author line and footnotes. */
.author-info-role span,
.blog-article-body .text-medium-gray,
.text-medium-gray.small {
    color: #4a5568 !important;
}

/* Input text colour itself (theme sets #828282 on all inputs). */
#contactForm input,
#contactForm textarea,
.dsv-track-input {
    color: #4a4a4a !important;
}

/* Get Quote multi-step form only (Insurex uses .insurex-steps and is left untouched). */
.form-stepper-wrapper .stepInfo .label {
    color: #6b7280 !important;
}
.multi-step-wrapper .form-btn.primary {
    background-color: #0077b6 !important;
}

/* --- Pause control for the autoplaying homepage video (WCAG 2.2.2) ---- */
.marinex-video-toggle {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 52, 80, 0.85);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.marinex-video-toggle:hover {
    background: #0f3450;
}
.marinex-video-toggle .icon-play,
.marinex-video-toggle.is-paused .icon-pause {
    display: none;
}
.marinex-video-toggle.is-paused .icon-play {
    display: block;
}

/* Text pages rendered from resources/views/front/pages (e.g. accessibility statement) */
.marinex-page-text h2 {
    margin-top: 1.75rem;
}
.marinex-page-text ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.marinex-page-text li {
    margin-bottom: .35rem;
}
.marinex-page-text a {
    color: #0077b6;
    text-decoration: underline;
}
.marinex-page-text a:hover {
    color: #0f3450;
}
