/**
 * @file asthma-page.css
 * @description Asthma Coalition page-specific styling.
 * @organization Los Angeles County Department of Public Health
 * @division Maternal, Child, and Adolescent Health
 * @requires global-mch.css
 * @requires Font Awesome 5 or compatible version
 *
 * @remarks
 * Load after global-mch.css.
 * Extends the shared MCAH provider card components.
 * Supports responsive layouts, keyboard navigation,
 * visible focus indicators, and reduced-motion preferences.
 */


/* ==========================================================
   01. PAGE DESIGN TOKENS
   ========================================================== */

#asthma__page {
    --asthma-primary: #004b85;
    --asthma-primary-dark: #00365f;
    --asthma-primary-hover: #0a5fa0;

    --asthma-text: #243746;
    --asthma-white: #ffffff;

    --asthma-light: #f4f8fc;
    --asthma-icon-bg: #e8f2fc;
    --asthma-border: #c8dcec;

    --asthma-focus: #004b85;

    --asthma-radius: 0.75rem;
    --asthma-shadow: 0 3px 12px rgba(0, 75, 133, 0.08);
    --asthma-shadow-hover: 0 6px 18px rgba(0, 75, 133, 0.16);
}


/* ==========================================================
   02. ASTHMA RESOURCES SECTION
   ========================================================== */

#asthma__page .asthma-resources-section {
    width: 100%;
    min-width: 0;
    container-type: inline-size;
}

#asthma__page .asthma-resources__intro {
    color: var(--asthma-text);
    line-height: 1.65;
    margin: 1rem 0 1.5rem;
}

#asthma__page a.mch-provider-card__action {
    background: var(--asthma-primary) !important;
    border: 2px solid var(--asthma-primary);   
    margin: 0 !important;
}

#asthma__page h3.mch-provider-card__title {
    font-size: clamp(1rem, 1rem + .25vw, 1.3rem) !important;
}

#asthma__page .mch-provider-card a.mch-provider-card__action:is(:hover, :focus-visible) {
    background: var(--asthma-primary-dark) !important;
    border-color: var(--asthma-primary-dark);
    color: #fff !important;
    background-image: none !important;
}

#asthma__page .mch-program-accordions>details.mch-program-accordion>.mch-program-accordion__panel {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

#asthma__page .formWeight {
    font-weight: 700;
    color: var(--dph-contact-primary);
}


/* ==========================================================
   03. RESPONSIVE RESOURCE GRID

   Extends the shared MCAH provider grid.
   Uses container queries so the layout responds to the
   available section width rather than only the viewport.
   ========================================================== */

#asthma__page .asthma-resources__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;

    gap: 1.15rem;

    width: 100%;
    min-width: 0;
    max-width: none;

    margin: 0;
    padding: 1.25rem;

    background: var(--asthma-light);
    border: 1px solid var(--asthma-border);
    border-radius: var(--asthma-radius);

    box-sizing: border-box;
}


/* ==========================================================
   04. RESOURCE CARD
   ========================================================== */

#asthma__page .asthma-resource-card {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    min-width: 0;
    height: 100%;
    padding: 1.25rem;

    background: var(--asthma-white);
    border: 1px solid var(--asthma-border);
    border-radius: var(--asthma-radius);

    box-shadow: var(--asthma-shadow);
    box-sizing: border-box;

    overflow: visible;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


/* Card hover effects for pointer-enabled devices. */

@media (hover: hover) and (pointer: fine) {
    #asthma__page .asthma-resource-card:hover {
        box-shadow: var(--asthma-shadow-hover);
    }
}


/* Highlight the card when its link receives focus. */

#asthma__page .asthma-resource-card:focus-within {
    border-color: var(--asthma-primary);
    box-shadow: var(--asthma-shadow-hover);
}


/* ==========================================================
   05. RESOURCE CARD BODY
   ========================================================== */

#asthma__page .asthma-resource-card .mch-provider-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;

    min-width: 0;
    padding: 0;
    margin: 0 0 1.25rem;
}


/* ==========================================================
   06. RESOURCE ICONS
   ========================================================== */

#asthma__page .asthma-resource-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 0 1rem;
    background: var(--asthma-icon-bg);
    color: var(--asthma-primary);
    border: 1px solid var(--asthma-border);
    border-radius: 0.65rem;
    font-size: 1.65rem;
    line-height: 1;
    box-sizing: border-box;
}

#asthma__page .asthma-resource-card__icon i {
    color: inherit;
    font-size: inherit;
    line-height: 1;
}


/* ==========================================================
   07. CARD HEADINGS AND DESCRIPTIONS
   ========================================================== */

#asthma__page .asthma-resource-card .mch-provider-card__title {
    margin: 0 0 0.65rem;
    padding: 0;

    background: transparent;
    color: var(--asthma-primary);

    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;

    overflow-wrap: anywhere;
}

#asthma__page .asthma-resource-card .mch-provider-card__body p {
    margin: 0;
    color: var(--asthma-text);
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}


/* ==========================================================
   08. VIEW RESOURCE ACTION LINK

   Uses an anchor instead of a button because the action
   navigates to an external website.
   ========================================================== */

#asthma__page .asthma-resource-card__action,
#asthma__page .asthma-resource-card__action:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: auto 0 0;
    padding: 0.75rem 1rem;
    background: var(--asthma-primary);
    color: var(--asthma-white);
    border: 2px solid transparent;
    border-radius: 0.4rem;
    box-shadow: 0 2px 5px rgba(0, 75, 133, 0.15);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
    box-sizing: border-box;

    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

#asthma__page .asthma-resource-card__action span {
    min-width: 0;
    overflow-wrap: anywhere;
}

#asthma__page .asthma-resource-card__action i {
    flex-shrink: 0;

    color: inherit;

    font-size: 0.85rem;
    line-height: 1;
}


/* Hover */

#asthma__page .asthma-resource-card__action:hover {
    background: var(--asthma-primary-hover);
    color: var(--asthma-white);

    text-decoration: underline;

    box-shadow: 0 4px 8px rgba(0, 75, 133, 0.2);
}


/* Keyboard focus */

#asthma__page .asthma-resource-card__action:focus {
    outline: 3px solid var(--asthma-focus);
    outline-offset: 3px;

    background: var(--asthma-primary-dark);
    color: var(--asthma-white);

    text-decoration: underline;
}


/* Active state */

#asthma__page .asthma-resource-card__action:active {
    background: var(--asthma-primary-dark);
    color: var(--asthma-white);

    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}


/* ==========================================================
   09. RESOURCE GRID RESPONSIVE LAYOUT
   ========================================================== */


/* Tablet and narrower content containers. */

@container (max-width: 850px) {

    #asthma__page .asthma-resources__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        padding: 1rem;
    }

}


/* Mobile and narrow content containers. */

@container (max-width: 540px) {

    #asthma__page .asthma-resources__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.85rem;
        padding: 0.75rem;
    }

    #asthma__page .asthma-resource-card {
        padding: 1rem;
    }

    #asthma__page .asthma-resource-card__icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.4rem;
    }

    #asthma__page .asthma-resource-card .mch-provider-card__title {
        font-size: 1.1rem;
    }

}


/* Fallback for browsers without container query support. */

@supports not (container-type: inline-size) {

    @media (max-width: 991px) {

        #asthma__page .asthma-resources__grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 1rem;
            padding: 1rem;
        }

    }

    @media (max-width: 600px) {

        #asthma__page .asthma-resources__grid {
            grid-template-columns: minmax(0, 1fr);
            gap: 0.85rem;
            padding: 0.75rem;
        }

    }

}


/* ==========================================================
   10. GENERAL ASTHMA ACTION BUTTON

   Retained for the Asthma Brief and other page actions.
   ========================================================== */

#asthma__page .center-btn {
    margin: 0 auto;
    text-align: center;
}

#asthma__page .asthma-btn,
#asthma__page .asthma-btn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-wrap: wrap;
    gap: 0.5rem;

    max-width: 100%;
    min-height: 48px;

    padding: 0.75rem 1.5rem;

    background: var(--asthma-primary);
    color: var(--asthma-white);

    border: 2px solid transparent;
    border-radius: 0.4rem;

    box-shadow:
        0 3px 8px rgba(0, 75, 133, 0.2),
        inset 0 -3px 0 rgba(0, 0, 0, 0.12);

    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;

    text-align: center;
    text-decoration: none;

    white-space: normal;
    overflow-wrap: anywhere;

    cursor: pointer;
    touch-action: manipulation;

    box-sizing: border-box;

    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

#asthma__page .asthma-btn:hover {
    background: var(--asthma-primary-hover);
    color: var(--asthma-white);
    text-decoration: underline;
}

#asthma__page .asthma-btn:focus {
    outline: 3px solid var(--asthma-focus);
    outline-offset: 3px;

    background: var(--asthma-primary-dark);
    color: var(--asthma-white);
}

#asthma__page .asthma-btn:active {
    background: var(--asthma-primary-dark);
    color: var(--asthma-white);

    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {

    #asthma__page .asthma-btn {
        min-height: 44px;
        padding: 0.65rem 1rem;
        font-size: 1rem;
    }

}


/* ==========================================================
   11. GENERAL TWO-COLUMN CONTENT LAYOUT

   Used by the How to Get Involved section.
   ========================================================== */

#asthma__page .row-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

#asthma__page .row-grid>* {
    min-width: 0;
}

#asthma__page .box-new {
    border-radius: var(--asthma-radius);
}

@media (max-width: 768px) {

    #asthma__page .row-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

}


/* ==========================================================
   12. CONTACT SECTION
   ========================================================== */

#asthma__page .contact-info h1,
#asthma__page .contact-info h2 {
    font-weight: 600;
}


/* ==========================================================
   13. GENERAL LIST UTILITIES
   ========================================================== */

#asthma__page .custom-marker {
    list-style-type: none;
}


/* ==========================================================
   14. ACCESSIBILITY — REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    #asthma__page .asthma-resource-card,
    #asthma__page .asthma-resource-card__action,
    #asthma__page .asthma-btn {
        transition: none;
        animation: none;
    }

    #asthma__page .asthma-resource-card:hover {
        transform: none;
    }

}


/* ==========================================================
   15. ACCESSIBILITY — FORCED COLORS / HIGH CONTRAST
   ========================================================== */

@media (forced-colors: active) {

    #asthma__page .asthma-resource-card,
    #asthma__page .asthma-resource-card__icon {
        border: 1px solid CanvasText;
        box-shadow: none;
    }

    #asthma__page .asthma-resource-card__action,
    #asthma__page .asthma-btn {
        border: 2px solid LinkText;
        color: LinkText;
        box-shadow: none;
    }

    #asthma__page .asthma-resource-card__action:focus,
    #asthma__page .asthma-btn:focus {
        outline: 3px solid Highlight;
        outline-offset: 3px;
    }

}

/* ==========================================================
   16. ASTHMA COALITION — CONTACT INFORMATION

   Responsive contact panel with accessible email and
   telephone links. Uses existing Asthma page design tokens.
   ========================================================== */

#asthma__page .asthma-coalition-contact {
    box-sizing: border-box;
    container-type: inline-size;

    width: 100%;
    min-width: 0;
    max-width: 100%;

    margin: 1.25rem 0 0;
    padding: 1.15rem;

    background: var(--asthma-light);

    border: 1px solid var(--asthma-border);
    border-left: 5px solid var(--asthma-primary);
    border-radius: var(--asthma-radius);

    box-shadow: var(--asthma-shadow);
}

/* Contact panel heading */

#asthma__page .asthma-coalition-contact__title {
    display: flex;
    align-items: center;
    gap: 0.65rem;

    margin: 0 0 0.65rem;
    padding: 0;

    background: transparent;
    color: var(--asthma-primary);

    border: 0;

    font-size: clamp(1.15rem, 1.8vw, 1.4rem);
    font-weight: 700;
    line-height: 1.35;

    text-align: left;
    text-transform: none;

    overflow-wrap: anywhere;
}

#asthma__page .asthma-coalition-contact__title i {
    flex-shrink: 0;
    color: inherit;
    font-size: 1.25rem;
}

/* Introductory text */

#asthma__page .asthma-coalition-contact__intro {
    margin: 0 0 0.85rem;
    color: var(--asthma-text);
    line-height: 1.6;
}

/* ==========================================================
   CONTACT INFORMATION GRID
   ========================================================== */

#asthma__page .asthma-coalition-contact__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;

    gap: 0.85rem;
    width: 100%;
    min-width: 0;
}

/* Individual contact cards */

#asthma__page .asthma-coalition-contact__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;

    box-sizing: border-box;
    min-width: 0;
    padding: 0.85rem;

    background: var(--asthma-white);

    border: 1px solid var(--asthma-border);
    border-radius: 0.5rem;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

/* Contact icons */

#asthma__page .asthma-coalition-contact__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 2.75rem;

    width: 2.75rem;
    height: 2.75rem;

    background: var(--asthma-icon-bg);
    color: var(--asthma-primary);

    border: 1px solid var(--asthma-border);
    border-radius: 0.5rem;

    font-size: 1.15rem;
    line-height: 1;
}

/* Contact labels and values */

#asthma__page .asthma-coalition-contact__details {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;

    min-width: 0;
    gap: 0.15rem;

    color: var(--asthma-text);

    overflow-wrap: anywhere;
}

#asthma__page .asthma-coalition-contact__details strong {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
}

/* ==========================================================
   EMAIL AND TELEPHONE LINKS
   ========================================================== */

#asthma__page .asthma-coalition-contact__details a,
#asthma__page .asthma-coalition-contact__details a:visited {
    display: flex;
    align-items: center;

    min-width: 0;
    min-height: 44px;

    color: var(--asthma-primary);

    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;

    text-decoration: underline;
    text-underline-offset: 3px;

    white-space: normal;
    overflow-wrap: anywhere;

    cursor: pointer;
}

/* Pointer hover */

@media (hover: hover) and (pointer: fine) {

    #asthma__page .asthma-coalition-contact__item:hover {
        border-color: var(--asthma-primary);
        box-shadow: var(--asthma-shadow-hover);
    }

    #asthma__page .asthma-coalition-contact__details a:hover {
        color: var(--asthma-primary-dark);
        text-decoration-thickness: 2px;
    }
}

/* Keyboard focus */

#asthma__page .asthma-coalition-contact__item:focus-within {
    border-color: var(--asthma-primary);
    box-shadow: var(--asthma-shadow-hover);
}

#asthma__page .asthma-coalition-contact__details a:focus-visible {
    outline: 3px solid var(--asthma-focus);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ==========================================================
   RESPONSIVE CONTACT LAYOUT
   ========================================================== */

/* Respond to the actual panel width. */

@container (max-width: 580px) {

    #asthma__page .asthma-coalition-contact__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem;
    }
}

/* Fallback for browsers without container queries. */

@supports not (container-type: inline-size) {

    @media (max-width: 768px) {

        #asthma__page .asthma-coalition-contact__grid {
            grid-template-columns: minmax(0, 1fr);
            gap: 0.65rem;
        }
    }
}

/* Small mobile screens */

@media (max-width: 480px) {

    #asthma__page .asthma-coalition-contact {
        padding: 0.85rem;
        border-left-width: 4px;
    }

    #asthma__page .asthma-coalition-contact__title {
        font-size: 1.15rem;
    }

    #asthma__page .asthma-coalition-contact__item {
        padding: 0.65rem;
        gap: 0.55rem;
    }

    #asthma__page .asthma-coalition-contact__icon {
        flex-basis: 2.25rem;
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1rem;
    }

    #asthma__page .asthma-coalition-contact__details a {
        font-size: 0.9rem;
    }
}

/* ==========================================================
   ACCESSIBILITY — REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    #asthma__page .asthma-coalition-contact__item {
        transition: none;
        animation: none;
    }
}

/* ==========================================================
   ACCESSIBILITY — FORCED COLORS / HIGH CONTRAST
   ========================================================== */

@media (forced-colors: active) {

    #asthma__page .asthma-coalition-contact,
    #asthma__page .asthma-coalition-contact__item,
    #asthma__page .asthma-coalition-contact__icon {
        border: 1px solid CanvasText;
        box-shadow: none;
    }

    #asthma__page .asthma-coalition-contact__title {
        color: CanvasText;
    }

    #asthma__page .asthma-coalition-contact__details a {
        color: LinkText;
    }

    #asthma__page .asthma-coalition-contact__details a:focus-visible {
        outline: 3px solid Highlight;
    }
}