/**
 * LUPKYNIS Pro - WordPress Theme Overrides
 *
 * 0. Global smooth scrolling
 * 1. Get Connected safety net (hide any remaining references)
 * 2. WordPress admin bar adjustments
 * 3. Polylang language switcher styles
 * 4. ACF image constraints
 * 5. Teal class color inheritance
 * 6. Font-family overrides (system-ui to match original site)
 * 7. Font-weight utility overrides
 * 8. ISI spacing – restore rules missing from our style-min.css
 */

/* ==========================================================================
   0. Global smooth scrolling
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   1. Get Connected – Safety net hide  (DISABLED for CU-86ba0txfb — page restored)
   ========================================================================== */

/* (rules removed: a[href*="get-connected"] and [class*="get-connected"] no
   longer hidden, so the restored Get Connected page and buttons can render.) */

/* ==========================================================================
   2. WordPress Admin Bar Adjustments
   ========================================================================== */

/* When WP admin bar is showing, adjust sticky elements */
body.admin-bar .indications-top {
    top: 32px;
}

body.admin-bar .isi-tray {
    /* ISI tray is fixed to bottom, no adjustment needed */
}

@media screen and (max-width: 782px) {
    body.admin-bar .indications-top {
        top: 46px;
    }
}

/* ==========================================================================
   3. Polylang Language Switcher
   ========================================================================== */

.language-switcher {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.language-switcher li {
    margin: 0;
    padding: 0;
}

.language-switcher li a {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #023038;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.language-switcher li a:hover {
    background-color: rgba(2, 48, 56, 0.1);
}

.language-switcher li.active a {
    background-color: #023038;
    color: #fff;
}

/* Separator between languages */
.language-switcher li + li::before {
    content: "|";
    color: #ccc;
    font-size: 12px;
    margin-right: 2px;
}

/* ==========================================================================
   4. ACF Image Constraints
   Ensure all ACF-sourced images respect container bounds regardless of
   the dimensions of the uploaded replacement image.
   ========================================================================== */

/* Global: every img rendered inside main content areas */
.main img,
#hero img,
.inner img,
#modal_defendher img {
    max-width: 100%;
    height: auto;
}

/* Bootstrap .img-fluid already does this but reinforce it.
   :not([style*="max-width"]) so inline caps (e.g. the 103px starting-patients
   icons) keep winning instead of being clobbered by !important. */
.img-fluid:not([style*="max-width"]) {
    max-width: 100% !important;
    height: auto !important;
}

/* --- Front Page --- */

/* Hero carousel slide images */
.carou-slide .branding img {
    max-width: 100%;
    height: auto;
}

/* Kidney section image (original: 271x175) */
#content .bg-gray img.my-auto {
    max-width: 271px;
    height: auto;
}

/* --- Lupus Nephritis --- */

/* Histologic Findings chart (original webp) */
#proteinuria-risk img.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Nephron Loss chart (original: 1270x683) */
.nephron-chart img,
.nephron-section img {
    max-width: 100%;
    height: auto;
}

/* --- How LUPKYNIS Works --- */

/* Molecular structure image (original: 600x742) */
#treatment-goals .structure-image img,
#treatment-goals img {
    max-width: 100%;
    height: auto;
}

/* Glucose/Lipid charts (SVG) */
.collapse__body img {
    max-width: 100%;
    height: auto;
}

/* Dual MOA icons (podocytes: 412x254, t-cells: 401x321) */
#about-lupkynis img {
    max-width: 100%;
    height: auto;
}

/* --- Efficacy --- */

/* CRR chart image (original: 690x632) */
#primary-endpoint img {
    max-width: 100%;
    height: auto;
}

/* UPCR chart (original: 1078x712), 50% UPCR chart (1078x725) */
#secondary-endpoints-1 img {
    max-width: 100%;
    height: auto;
}

/* eGFR chart (original: 690x436) */
#secondary-endpoints-2 img {
    max-width: 100%;
    height: auto;
}

/* Steroid reduction charts */
#steroid-tapering img {
    max-width: 100%;
    height: auto;
}

/* --- Dosing --- */

/* Packaging image (desktop only, col-lg-3 container) */
#dose-border img {
    max-width: 100%;
    height: auto;
}

/* Pills image (original: 171x78) */
.vertical-callout img {
    max-width: 171px;
    height: auto;
}

/* Schedule item icons (original: 240x240, rendered at ~103px) */
.dosing-schedule img,
.schedule-icon img {
    max-width: 103px;
    height: auto;
}

/* eGFR grid pill images */
.eGFR__1 img,
.eGFR__2 img {
    max-width: 100%;
    height: auto;
}

/* --- Patient Profiles --- */

/* Patient thumbnail images */
.patient-profile img,
.accordion img {
    max-width: 100%;
    height: auto;
}

/* --- Starting Patients --- */

/* Support item icons (original: 240x240, rendered at ~103px) */
.icon-text-row img,
section img[style*="max-width:103px"] {
    max-width: 103px;
    height: auto;
}

/* Hero image */
.starting-hero img {
    max-width: 100%;
    height: auto;
}

/* --- Resources --- */

/* Video thumbnails and PDF thumbnails */
.video-thumbnail-container img {
    max-width: 100%;
    height: auto;
}

/* --- DefendHer Modal --- */

/* Modal images */
#modal_defendher .inner img {
    max-width: 100%;
    height: auto;
}

/* Logo in modal (original: 462x135 @2x) */
#modal_defendher .head .logo img {
    max-width: 220px;
    height: auto;
}

/* DefendHer group photo (original: 1052x956) */
#modal_defendher .branding img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   5. Teal class – ensure WYSIWYG inner <p> inherits color
   ========================================================================== */

#bordered p.teal,
#bordered .teal,
#bordered .teal p {
    color: #00a5ad;
}

/* ==========================================================================
   6. Font-Family Overrides – match original site (lupkynispro.com)
   Our local style-min.css starts the system stack with "Helvetica" but the
   production site starts with "system-ui".  Override every selector that
   explicitly sets the Helvetica stack so our fonts are identical.
     – body / general text: system-ui stack  (overridden below)
     – h1-h4, .btn, nav, .big, .open-sans, etc.: "Mulish", sans-serif  (correct in style-min.css)
     – .billboard headline: "Montserrat", sans-serif  (correct in style-min.css)
   ========================================================================== */

/* Body – all paragraphs, spans, ISI, footer text, indication banner, etc.
   inherit from here */
body {
    font-family: system-ui, -apple-system, "Arial", "Segoe UI", Helvetica, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}

/* Large hero heading variant (h1.big) – uses system stack, not Mulish */
h1.big,
.h1.big {
    font-family: system-ui, -apple-system, "Arial", "Segoe UI", Helvetica, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Accordion / collapse heading buttons */
.collapse__heading button {
    font-family: system-ui, -apple-system, "Arial", "Segoe UI", Helvetica, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Chart header spans (e.g. dosing tables, patient-profile tables) */
.chart th > span {
    font-family: system-ui, -apple-system, "Arial", "Segoe UI", Helvetica, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Patient-profile chart headers */
.patient-profile .chart th {
    font-family: system-ui, -apple-system, "Arial", "Segoe UI", Helvetica, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* ==========================================================================
   7. Font-Weight Utility Overrides
   ========================================================================== */

/* Reinforce font-weight utility classes (may be overridden by Bootstrap) */
.font-weight-heavy {
    font-weight: 800 !important;
}

.font-weight-black {
    font-weight: 900 !important;
}

.bold {
    font-weight: 700 !important;
}

.italic {
    font-style: italic !important;
}

/* Fix bold weight to match original site (700, not 800) */
b, strong {
    font-weight: 700 !important;
}

/* ==========================================================================
   8. ISI Spacing – restore rules present in the original site's
   style-min.css but missing from ours.
   Original selectors and values preserved exactly.
   ========================================================================== */

/* .isi__margin-bottom  –  original: margin-bottom:1rem */
.isi__margin-bottom {
    margin-bottom: 1rem;
}

/* .isi p  –  original: font-size:1rem
   Overrides mobile-first base rule  p{font-size:.875rem}  so ISI
   paragraphs stay 16 px at every breakpoint. */
.isi p {
    font-size: 1rem;
}

/* .isi ul  –  original: padding-left:20px;margin:.625rem 0
   Overrides Bootstrap  ol,ul,dl{margin-top:0;margin-bottom:1rem}  */
.isi ul {
    padding-left: 20px;
    margin: .625rem 0;
}

/* .isi ul li  –  original: padding-bottom:6px;line-height:1.2rem */
.isi ul li {
    padding-bottom: 6px;
    line-height: 1.2rem;
}


/* ==========================================================================
   10. CU-86ba4h8t2 - Client feedback adjustments
   ========================================================================== */

/* Anchor jump offset so sticky header + sub-nav don't clip the target
   section title. The efficacy and resources pages share a shorter sticky
   stack than the LN page, so #primary-endpoint and the resources-page
   #getting-started use a smaller offset. #getting-started is scoped by
   body id because both LN and resources expose that anchor. */
#primary-endpoint,
body#resources #getting-started {
    scroll-margin-top: 5rem;
}
#acr-guideline,
body#lupus-nephritis #getting-started {
    scroll-margin-top: 140px;
}

body.admin-bar #primary-endpoint,
body.admin-bar#resources #getting-started {
    scroll-margin-top: 7rem;
}
body.admin-bar #acr-guideline,
body.admin-bar#lupus-nephritis #getting-started {
    scroll-margin-top: 172px;
}

/* Slide 10 - Efficacy AURORA 2 study-design row gets cut in responsive view.
   The control-arm row label ("Placebo BID + MMF + LDS") was bottom-clipped. */
@media (max-width: 991.98px) {
    .study-design-container,
    .study-design,
    #study-design {
        overflow: visible;
    }
}

/* Dosing eGFR col3 last group (Discontinue LUPKYNIS) - keep the text/icon
   alignment fix so the prohibition icon sits next to the label cleanly. */
.eGFR__2 .right .group .text-icon {
    align-items: center;
}

.eGFR__2 .right .group:not(:has(.text-icon)) p.small {
    padding-top: 0.5rem;
}

/* Lupus Nephritis MMF + Steroids and Kidney Survival charts. */
img.chart-kidney-survival,
img.chart-mmf-steroids {
    max-width: 78% !important;
}


/* Get Connected form: submission states driven by assets/js/get-connected-form.js. */
#registration-form.is-submitting button[type="submit"] {
    opacity: 0.6;
    cursor: progress;
}

#registration-error[hidden] {
    display: none !important;
}

#registration-error {
    display: block;
    margin-top: 1.5rem;
    /* Focused on error; keep it clear of the sticky header. */
    scroll-margin-top: 8rem;
}

#registration-error ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    font-weight: 400;
}


/* ==========================================================================
   9. Superscript Typography (2026 HCP refresh)
   Figma sets every superscript with the font's OpenType SUPS glyphs. The Mulish
   that Google Fonts serves has no SUPS, so this reproduces them as measured from
   the Figma exports (Starting Patients 2152:47694, 2152:47786, 2152:49929,
   2152:49933): glyphs 0.6 of the text size (figure height 0.425em) whose
   baseline sits 0.35em above the text baseline, so the top of a figure is level
   with, or just above, the cap height. The shift is a relative offset with
   line-height 0, so the line box does not grow. Weight is inherited so
   superscripts are not thinner than the text around them. Keep a <sup> inside an
   inline parent: as a direct flex item (e.g. in .page-anchors a) it is blockified
   and centred, and this offset no longer lands on the cap height.
   ========================================================================== */

sup {
    position: relative;
    top: -0.583em; /* 0.35em of the text: 0.35 / 0.6 */
    font-size: 0.6em;
    font-weight: inherit;
    line-height: 0;
    vertical-align: baseline;
}
