/**
 * LUPKYNIS Pro – 2026 HCP Important Safety Information: sticky tray (template-parts/isi-tray.php)
 * and the in-page section (template-parts/isi-section.php).
 *
 * Source: Figma HCP file, component set "ISI_DT" (2215:18191), variants "Default" (expanded, minus)
 * and "Collapsed" (plus); used on 0.0 Home Desktop Expand / Collapse.
 *   - white panel, 2px top rule with the brand gradient, 24px top/bottom and 100px side padding
 *   - header row: "IMPORTANT SAFETY INFORMATION" Mulish 800 18/22.59 #00ADA6, and a 27px #007B76
 *     circle with a white 15px plus/minus (1.5px, round caps) at the right edge
 *   - copy Mulish 16/20 #023038; 16px between blocks, 4px between a heading and its copy
 *   - "INDICATION" Mulish 800 16px #00ADA6
 * Figma only has the desktop (1440) frames; tablet/mobile reuse the footer's 40px/20px side padding.
 *
 * Its own file rather than the tail of theme-overrides.css, which every branch edits.
 */

.isi-tray,
.isi {
    font-family: "Mulish", sans-serif;
    color: #023038;
}

.isi-tray {
    padding-top: 0;
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, #023038 9.698%, #004744 43.684%, #00ada6 110.99%) 1;
    box-shadow: none;
    font-size: 1rem;
    line-height: 1.25;
}

.isi {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, #023038 9.698%, #004744 43.684%, #00ada6 110.99%) 1;
}

.isi-tray > .container,
.isi > .container {
    max-width: none;
    padding: 1.5rem 1.25rem;
}

@media (min-width: 768px) {
    .isi-tray > .container,
    .isi > .container {
        padding-right: 2.5rem;
        padding-left: 2.5rem;
    }
}

/* Desktop: the text column is Figma's 1238px (1438px ISI_DT minus 2 x 100px), centred, never wider.
   It used to grow with the window (100px side padding at any width), so on screens wider than 1440
   (1536 laptops, 1920) the copy re-wrapped: "Nausea and / vomiting", "...not recommended in this
   situation." on one line. The side padding also gives way to a classic 15px scrollbar (body and the
   expanded tray), which otherwise left a 1210-1225px column and broke "...Monitor for skin changes and
   / advise". From 1318px up the column is exactly 1238px; below that it keeps 40px sides like tablet. */
@media (min-width: 1200px) {
    .isi-tray > .container,
    .isi > .container {
        padding-right: max(2.5rem, calc((100% - 77.375rem) / 2));
        padding-left: max(2.5rem, calc((100% - 77.375rem) / 2));
    }
}

/* Figma breaks these lines by hand (U+2028): "...for complete / BOXED WARNING." and
   "...is not recommended in / this situation." Same words, kept together on one line. Desktop only
   (Figma has no tablet/mobile ISI); narrower screens wrap naturally. */
@media (min-width: 1200px) {
    .isi-tray .isi__nowrap,
    .isi .isi__nowrap {
        white-space: nowrap;
    }
}

/* Header row: title on the left, view toggle on the right, vertically centred. */
.isi-tray__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.isi-tray .isi__title,
.isi .isi__title {
    display: block;
    margin: 0;
    color: #00ada6;
    font-family: "Mulish", sans-serif;
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.255;
    text-transform: uppercase;
    text-decoration: none;
}

/* Figma has no mobile ISI frame: below 576px the 18px title would wrap next to the toggle, so it
   steps down to 15px with a tighter gap and stays on one line at 375px. */
@media (max-width: 575.98px) {
    .isi-tray__header {
        gap: 0.5rem;
    }

    .isi-tray .isi-tray__title,
    .isi .container > .isi__title:first-child {
        font-size: 0.9375rem;
    }
}

.isi .container > .isi__title:first-child {
    margin-bottom: 1rem;
}

.isi-tray a.isi__title:hover {
    color: #00ada6;
    text-decoration: underline;
}

.isi-tray a.isi__title:focus-visible {
    outline: 2px solid #023038;
    outline-offset: 2px;
}

/* "INDICATION" is a 16px sub-heading inside the copy. */
.isi-tray .isi__toggle-full .isi__title,
.isi .container > .isi__title ~ .isi__title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    line-height: 1.25;
}

/* Toggle: the old coral 36px circle with two rotated bars is replaced by Figma's 27px teal circle. */
.isi-tray .isi-tray__toggle {
    float: none;
    flex: 0 0 auto;
    margin: 0;
}

.isi-tray .isi-tray__button {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 43px hit area around the 27px circle without moving it. */
    margin: -0.5rem;
    padding: 0.5rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.isi-tray .isi-tray__button:focus {
    outline: none;
}

.isi-tray .isi-tray__button:focus-visible {
    outline: 2px solid #023038;
    outline-offset: -2px;
}

.isi-tray .isi-tray__icon {
    display: block;
    width: 1.6875rem;
    height: 1.6875rem;
}

.isi-tray .isi-tray__toggle svg,
.isi-tray .isi-tray__toggle svg:last-of-type,
.isi-tray.expand .isi-tray__toggle svg {
    position: static;
    display: block;
    width: 1.6875rem;
    height: 1.6875rem;
    overflow: visible;
    transform: none;
}

.isi-tray .isi-tray__icon circle {
    transition: fill 0.2s ease;
}

.isi-tray .isi-tray__button:hover .isi-tray__icon circle {
    fill: #004744;
}

.isi-tray .isi-tray__icon-v {
    transition: opacity 0.2s ease;
}

/* Expanded = minus (Figma "Default"); collapsed = plus (Figma "Collapsed"). */
.isi-tray.expand .isi-tray__icon-v {
    opacity: 0;
}

/* Copy */
.isi-tray p,
.isi-tray li,
.isi p,
.isi li {
    font-size: 1rem;
    line-height: 1.25;
}

.isi-tray .isi__copy,
.isi .isi__copy {
    margin: 0 0 0.25rem;
    color: #023038;
}

.isi-tray .isi__margin-bottom,
.isi .isi__margin-bottom {
    margin-bottom: 1rem;
}

.isi-tray ul,
.isi ul {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

.isi-tray ul li,
.isi ul li {
    padding-bottom: 0;
    line-height: 1.25;
}

.isi .container > p:last-child,
.isi-tray .isi__toggle-full > p:last-child {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Collapsed tray ends on the boxed-warning sentence: no trailing gap (Figma Collapsed is 169px tall). */
.isi-tray:not(.expand) .isi__toggle-text {
    margin-bottom: 0;
}

.isi-tray .pi-cta,
.isi .pi-cta {
    color: #023038;
    text-decoration: underline;
}

.isi-tray .pi-cta:focus-visible,
.isi .pi-cta:focus-visible {
    outline: 2px solid #023038;
    outline-offset: 2px;
}
