/*
 Theme Name:   Open Door Health Community
 Theme URI:    https://generatepress.com
 Description:  GeneratePress child theme for Open Door Health Community
 Author:       Your Name
 Author URI:   https://yoursite.com
 Template:     generatepress
 Version:      1.0
*/

/* ==========================================================================
   ANIMATION FLASH PREVENTION
   Loaded early (synchronously in <head>) to pre-hide animated elements
   before any plugin JS or async CSS has a chance to load.

   Problem: Otter Blocks loads its animation CSS asynchronously. Between
   the initial HTML paint and when that CSS arrives, animated elements are
   fully visible. Then Otter's CSS sets opacity:0, causing a visible flash.

   Fix: We set opacity:0 here, earlier in the load order. Otter restores
   visibility itself by adding .o-anim-ready when the animation fires.
   ========================================================================== */

/* Otter Blocks — animated elements (opacity restored by Otter's JS) */
[data-animation-name]:not(.o-anim-ready) {
    opacity: 0;
}

/* General safeguard for any block using animate.css via Otter.
   .animated is the animate.css base class; without .o-anim-ready
   the animation has not yet been triggered. */
.animated:not(.o-anim-ready) {
    opacity: 0;
}

/* Smooth scroll for anchor/ID links site-wide.
   prefers-reduced-motion: respect users who have requested less motion
   (WCAG 2.1 SC 2.3.3 — vestibular disorder accessibility). */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ==========================================================================
   Brand Color Variables (from Brand Guidelines)
   ==========================================================================
   Blue:              #007C91  - Primary brand color, headers, navigation, buttons
   Gray:              #445D6C  - Body text, secondary content
   Light Gray:        #DBE2E9  - Borders, subtle backgrounds, captions
   Coral:             #EA6D6A  - Warm accent, secondary CTAs
   Green:             #C4D600  - Lime accent, decorative elements
   Light Lime Green:  #E3EAB0  - Light accent backgrounds
   ========================================================================== */

:root {
    /* Primary Colors */
    --odh-blue: #007C91;
    --odh-teal: #007C91;
    --odh-gray: #445D6C;

    /* Secondary Colors */
    --odh-gray-light: #DBE2E9;
    --odh-orange: #EA6D6A;
    --odh-teal-light: #E3EAB0;
    --odh-lime: #C4D600;
    --odh-lime-light: #E3EAB0;

    /* Neutrals */
    --odh-white: #FFFFFF;
    --odh-off-white: #F7F9FA;
    --odh-dark: #2D3748;

    /* Typography */
    --odh-font-primary: 'Montserrat', sans-serif;
}

/* ==========================================================================
   Base Typography
   ========================================================================== */

body,
button,
input,
select,
textarea,
p,
li,
dd,
dt,
blockquote {
    font-family: var(--odh-font-primary);
    font-weight: 500;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--odh-font-primary);
    color: var(--odh-blue);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 700; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

a {
    color: var(--odh-teal);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--odh-blue);
}

/* ==========================================================================
   GeneratePress Overrides
   ========================================================================== */

/* NOTE: All header, navigation, utility bar, sticky nav, and mobile nav
   styles are in header.css (enqueued separately) */

/* ==========================================================================
   Buttons – structural base
   Scoped to Gutenberg block buttons only. Does NOT touch bare <button>
   elements so admin UI, mobile menu toggles, and editor chrome are safe.
   ========================================================================== */

.wp-block-button__link,
a.wp-block-button__link {
    font-family: var(--odh-font-primary);
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 11px 26px;
    border: 2px solid transparent;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Form submit buttons – scoped to site content area only */
.entry-content input[type="submit"],
.site-content input[type="submit"],
.comment-form input[type="submit"] {
    font-family: var(--odh-font-primary);
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 11px 26px;
    border: 2px solid transparent;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    background-color: var(--odh-teal);
    color: var(--odh-white);
    cursor: pointer;
}

.entry-content input[type="submit"]:hover,
.site-content input[type="submit"]:hover,
.comment-form input[type="submit"]:hover {
    background-color: var(--odh-blue);
    color: var(--odh-white);
}

/* ==========================================================================
   Buttons – default color (only when NO ODH variation is selected)
   The :not() selector prevents these from interfering with variation styles.
   ========================================================================== */

.wp-block-button:not([class*="is-style-odh-"]) > .wp-block-button__link {
    background-color: var(--odh-teal);
    color: var(--odh-white);
}

.wp-block-button:not([class*="is-style-odh-"]) > .wp-block-button__link:hover {
    background-color: var(--odh-blue);
    color: var(--odh-white);
}

/* ==========================================================================
   Button Style Variations – registered via register_block_style()
   Selectable in the block editor under Styles when a Button is selected.

   !important is used intentionally to guarantee variation colors override
   WordPress-generated inline styles and utility classes (has-*-background-color,
   has-*-color). This follows WordPress core's own pattern — see the built-in
   "Outline" button style (is-style-outline) which also uses !important.

   USAGE: When placing a button in Gutenberg, select the variation from the
   Styles panel. Do NOT also set custom background/text colors in the block
   settings — the variation handles all colors automatically.
   ========================================================================== */

/* ---------- 1. ODH Outline Lime ---------- */
.wp-block-button.is-style-odh-outline-lime .wp-block-button__link {
    background-color: var(--odh-white) !important;
    color: var(--odh-dark) !important;
    border: 2px solid #C4D600 !important;
}

.wp-block-button.is-style-odh-outline-lime .wp-block-button__link:hover {
    background-color: #C4D600 !important;
    color: var(--odh-dark) !important;
    border-color: #C4D600 !important;
}

/* ---------- 2. ODH Outline Teal ---------- */
.wp-block-button.is-style-odh-outline-teal .wp-block-button__link {
    background-color: var(--odh-white) !important;
    color: var(--odh-dark) !important;
    border: 2px solid var(--odh-teal) !important;
}

.wp-block-button.is-style-odh-outline-teal .wp-block-button__link:hover {
    background-color: var(--odh-teal) !important;
    color: var(--odh-white) !important;
    border-color: var(--odh-teal) !important;
}

/* ---------- 3. ODH Outline Coral ---------- */
.wp-block-button.is-style-odh-outline-coral .wp-block-button__link {
    background-color: var(--odh-white) !important;
    color: var(--odh-dark) !important;
    border: 2px solid var(--odh-orange) !important;
}

.wp-block-button.is-style-odh-outline-coral .wp-block-button__link:hover {
    background-color: var(--odh-orange) !important;
    color: var(--odh-white) !important;
    border-color: var(--odh-orange) !important;
}

/* ---------- 4. ODH Subtle ---------- */
.wp-block-button.is-style-odh-subtle .wp-block-button__link {
    background-color: var(--odh-off-white) !important;
    color: var(--odh-dark) !important;
    border: 2px solid #E2E8F0 !important;
}

.wp-block-button.is-style-odh-subtle .wp-block-button__link:hover {
    background-color: #E2E8F0 !important;
    color: var(--odh-dark) !important;
    border-color: #D1D9E6 !important;
}

.search-modal-form {
    background-color: transparent !important;
}

.gp-modal input[type="search"], .search-modal-fields button {
    background-color:white !Important;
}

.search-modal-fields button {
    background: white;
    border-radius: 100%;
}
.search-modal-fields {
    gap:10px;
}
/* ==========================================================================
   Decorative Arrow Accents
   Two separate classes — add via "Additional CSS class" in Gutenberg.

   odh-arrows-blue  → blue right-pointing arrows on the RIGHT of the button
                       (used on "Visit Mankato")
   odh-arrows-green → green left-pointing arrows on the LEFT of the button
                       (used on "Visit Shakopee")

   Both are position:absolute, pointer-events:none — purely decorative.
   OK if the viewport clips them at narrower widths.
   ========================================================================== */

.odh-arrows-blue,
.odh-arrows-green {
    position: relative;
}

/* Blue right-pointing arrows — to the right of the button */
.odh-arrows-blue::after {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    transform: translateY(-50%);
    width: 50px;
    height: 40px;
    background: url('/wp-content/uploads/2026/02/blue-right-arrows-60ae0d.svg') no-repeat center / contain;
    pointer-events: none;
}

/* Green left-pointing arrows — to the left of the button */
.odh-arrows-green::before {
    content: '';
    position: absolute;
    top: 50%;
    right: calc(100% + 12px);
    transform: translateY(-50%);
    width: 50px;
    height: 40px;
    background: url('/wp-content/uploads/2026/02/left-green-arrows-aa5215.svg') no-repeat center / contain;
    pointer-events: none;
}

/* Hide arrows on mobile — they'd be clipped and look awkward */
@media (max-width: 767px) {
    .mankato-btn {
        margin-left:40px !Important;
    }
    .shakopee-btn {margin-right:40px !important;}
}

/* Widgets & sidebar */
.widget-title {
    font-family: var(--odh-font-primary);
    color: var(--odh-blue);
}

/* Footer */
.site-footer,
.site-info {
    font-family: var(--odh-font-primary);
}

.mobile-no-gap {
    gap:0 !important;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

@media only screen and (max-width: 799px) {
    .mobile-swap {
        flex-direction: column-reverse;
    }
    .mobile-hide {
        display: none;
    }
    .has-mobile-width-25  { width: 25% !important; }
    .has-mobile-width-50  { width: 50% !important; }
    .has-mobile-width-75  { width: 75% !important; }
    .has-mobile-width-100 { width: 100% !important; }
}

@media only screen and (min-width: 800px) {
    .desktop-hide {
        display: none;
    }
}

.menu-item img._mi {
    max-width: 25px;
    width: auto;
}


.alignwide {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.wp-block-column {
    word-break: keep-all;
}

.entry-content {
    overflow: hidden;
}

.site.container {
    margin-top: -38px;
    z-index: 1;
    position: relative;
    display: block;
}

.site-content {
    min-height: 100dvh;
}

.align-items-stretch {
    align-items: stretch !Important;
}

@media (max-width: 767px) {

    .site.container {
        margin-top: 0;
    }

    .mobile-scroll {
        flex-wrap: nowrap !important;
        overflow-x: scroll;
        padding-top: 30px;
        display: flex !important;
        flex-direction: row !important;
    }

    .mobile-scroll>div {
        width: 75%;
        min-width: 75%;
    }

}

/* -- fullwidth does nto take into account global body padding. in this case, 16px. Because of this we must modify the margins to inlclude this padding devided by 2 (16px padding set, so 8px added to each). */

.no-sidebar .entry-content .alignfull {
    margin-right: unset;
    margin-left: unset;
}

/* .no-sidebar .entry-content>.alignfull {
    margin-left: calc(-100vw / 2 + 100% / 2);
    margin-right: calc(-100vw / 2 + 100% / 2);
} */

.above-fold .wp-block-cover {
    align-items: stretch !important;
}

.above-fold>.wp-block-cover__inner-container .wp-block-cover__inner-container {
    display: flex;
}

/* ==========================================================================
   Timeline
   ========================================================================== */

.odh-timeline {
    position: relative;
    padding-left: 36px;
    margin: 0 auto;
}

.odh-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 13px;
    width: 2px;
    background: var(--odh-gray-light, #DBE2E9);
}

.odh-timeline-entry {
    position: relative;
    padding-bottom: 28px;
    padding-left: 0;
}

.odh-timeline-entry::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2.5px solid var(--odh-tl-dot, #007C91);
    background: var(--odh-white, #fff);
    z-index: 1;
}

/* Dot color cycle — blue, green, coral, repeat */
.odh-timeline-entry:nth-child(3n+1)::before { --odh-tl-dot: var(--odh-teal, #007C91); }
.odh-timeline-entry:nth-child(3n+2)::before { --odh-tl-dot: var(--odh-lime, #C4D600); }
.odh-timeline-entry:nth-child(3n+3)::before { --odh-tl-dot: var(--odh-orange, #EA6D6A); }

.odh-timeline-entry p {
    margin: 0 0 4px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--odh-gray, #445D6C);
}

.odh-timeline-year {
    font-weight: 700;
    color: var(--odh-dark, #2D3748);
}

/* ---------- Collapsible timeline ---------- */
.odh-timeline-collapsible {
    position: relative;
    max-height: 520px;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.odh-timeline-collapsible::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 90%);
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 2;
}


.odh-timeline-collapsible.odh-timeline-expanded::after {
    opacity: 0;
}

.odh-timeline-toggle {
    position: relative;
    z-index: 3;
    cursor: pointer;
}

.odh-timeline-toggle a {
    cursor: pointer;
}

@media (max-width: 767px) {
    .odh-timeline {
        padding-left: 28px;
    }

    .odh-timeline-entry::before {
        left: -21px;
        width: 10px;
        height: 10px;
    }

    .odh-timeline::before {
        left: 11px;
    }

    .odh-timeline-entry {
        padding-bottom: 22px;
    }

    .odh-timeline-entry p {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   ODH Modal
   ========================================================================== */

@keyframes odh-modal-in {
    from { opacity: 0; transform: translateY(-16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)     scale(1);    }
}

@keyframes odh-modal-out {
    from { opacity: 1; transform: translateY(0)     scale(1);    }
    to   { opacity: 0; transform: translateY(-16px) scale(0.97); }
}

dialog.odh-modal {
    border: none;
    border-radius: 12px;
    padding: 0;
    width: min(560px, 92vw);
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    animation: odh-modal-in 0.22s ease forwards;
}

dialog.odh-modal--closing {
    animation: odh-modal-out 0.18s ease forwards;
}

/* Hidden modal content source divs — translated by TranslatePress as real
   HTML but never rendered visually. The [hidden] attribute + these rules
   ensure zero layout impact regardless of browser or CSS reset. */
.odh-modal-source {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
}

dialog.odh-modal::backdrop {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}

.odh-modal-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px 36px 36px;
}

.odh-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--odh-gray, #5A6B7D);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

.odh-modal-close:hover {
    color: var(--odh-dark, #2D3748);
    background: var(--odh-off-white, #F7F9FA);
}

.odh-modal-title {
    font-family: var(--odh-font-primary, 'Montserrat', sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--odh-dark, #2D3748);
    margin: 0 0 16px;
    padding-right: 32px;
}

.odh-modal-content {
    font-family: var(--odh-font-primary, 'Montserrat', sans-serif);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--odh-gray, #5A6B7D);
}

.odh-modal-content p { margin: 0 0 12px; }
.odh-modal-content p:last-child { margin-bottom: 0; }
.odh-modal-content a { color: var(--odh-teal, #3CB4AC); }
.odh-modal-content a:hover { color: var(--odh-blue, #1B6E7D); }
.odh-modal-content ul,
.odh-modal-content ol { padding-left: 20px; margin: 0 0 12px; }

@media (max-width: 479px) {
    .odh-modal-inner {
        padding: 36px 20px 24px;
    }
}

@media (max-width:768px) {
.jotform-contact iframe {
    min-height: 1200px !important;
}

.jotform-report  iframe {
    min-height: 600px !important;
}
}

/* ==========================================================================
   PAY MY BILL MODAL — two-option card layout
   ========================================================================== */

.odh-pay-bill-intro {
    font-size: 0.9rem;
    color: var(--odh-gray, #5A6B7D);
    margin: 0 0 16px !important;
}

.odh-pay-bill-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.odh-pay-bill-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border: 2px solid var(--odh-teal, #3CB4AC);
    border-radius: 10px;
    text-decoration: none !important;
    transition: background 0.18s ease, border-color 0.18s ease;
    background: #fff;
}

.odh-pay-bill-option:hover {
    background: #f0fafa;
    border-color: var(--odh-blue, #007C91);
}

.odh-pay-bill-when {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--odh-dark, #2D3748);
    line-height: 1.3;
}

.odh-pay-bill-cta {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--odh-teal, #3CB4AC);
    white-space: nowrap;
    flex-shrink: 0;
}

.odh-pay-bill-option:hover .odh-pay-bill-cta {
    color: var(--odh-blue, #007C91);
}

.odh-pay-bill-option--mychart {
    border-color: #C4D600;
}

.odh-pay-bill-option--mychart:hover {
    background: #f9fbee;
    border-color: #a8b800;
}

.odh-pay-bill-option--mychart .odh-pay-bill-cta {
    color: #8a9900;
}

.odh-pay-bill-option--mychart:hover .odh-pay-bill-cta {
    color: #6b7800;
}

/* ==========================================================================
   ACCESSIBILITY — WCAG 2.1 AA Focus Styles
   :focus-visible targets keyboard users only (not mouse clicks), keeping
   the UI clean for pointer users while meeting WCAG 2.4.7 requirements.
   Minimum: 2px solid outline, 3:1 contrast against adjacent colours.
   ========================================================================== */

/* Remove browser default and apply a consistent visible ring everywhere */
:focus { outline: none; }

:focus-visible {
    outline: 3px solid var(--odh-teal, #007C91);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Buttons — teal ring on white bg = 4.6:1, passes AA */
.wp-block-button__link:focus-visible,
.odh-btn:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--odh-teal, #007C91);
    outline-offset: 3px;
    border-radius: 4px;
    box-shadow: 0 0 0 5px rgba(0, 124, 145, 0.2);
}

/* Links */
a:focus-visible {
    outline: 3px solid var(--odh-teal, #007C91);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Nav items — slightly tighter so they sit within the item bounds */
#site-navigation .main-nav a:focus-visible,
#sticky-navigation .main-nav a:focus-visible,
.slideout-navigation .main-nav a:focus-visible {
    outline: 3px solid var(--odh-teal, #007C91);
    outline-offset: 0;
    border-radius: 3px;
}

/* Form inputs */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--odh-teal, #007C91);
    outline-offset: 0;
    box-shadow: 0 0 0 4px rgba(0, 124, 145, 0.15);
}

/* Skip-to-content link (GP adds this automatically — style it visibly) */
.skip-link:focus-visible {
    position: fixed !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 99999;
    background: var(--odh-teal, #007C91);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    outline: 3px solid #fff;
    outline-offset: 2px;
    text-decoration: none;
}