/*
 * Mikvah Observance Checklist — /checklist
 *
 * Article-shell layout (`.article` + `.article__container`) provides the
 * breadcrumb / H1 / lede typography. This file adds:
 *   .checklist__notice   — slate background warning panel that replaces
 *                          the legacy orange `.alert_box.warning`
 *   .checklist__lede     — centered intro paragraphs above the tabs
 *   .checklist-tabs      — wrapper around the easytabs `.tabs` block
 *   .checklist-toggle    — pill-style tab nav (mirrors the directory
 *                          page's `.dir-toggle`, scoped to checklist
 *                          so tweaks here can't affect /directory)
 *   .checklist__panel    — tab body
 *   .checklist__subhead  — sub-heading inside a multi-section tab
 *
 * Tabs are mounted by the legacy theme.js auto-init on `.tabs` (easytabs).
 * The blade fires a `.easytabs('select', '#…')` AFTER init to apply the
 * active tab from the server-side $activeTab.
 */

/* ── Page wrapper override ──
 * `.article` ships with `padding: 32px 0 112px`; checklist needs the
 * same top breathing room but the tabs pane below the article shell is
 * full-width, so we keep the article padding and add our own bottom
 * spacing on the tabs section. */
.redesign .checklist__notice {
    max-width: 864px;
    margin: 0 auto 32px;
    padding: 24px 28px;
    background: var(--brand-slate);
    color: var(--neutral-white);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(85, 75, 75, 0.06);
}

.redesign .checklist__notice strong {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--neutral-white);
}

.redesign .checklist__notice ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.redesign .checklist__notice li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
}

.redesign .checklist__notice li:last-child { margin-bottom: 0; }

.redesign .checklist__notice li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neutral-white);
    opacity: 0.85;
}

.redesign .checklist__notice a {
    color: var(--neutral-white);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .redesign .checklist__notice {
        margin-inline: 20px;
        padding: 20px 22px;
        font-size: 15px;
    }
}

/* ── Intro tab panel ──
 * First tab of /checklist. Reads as a lede — slightly larger body size
 * than the other panels and a wider leading. Paragraphs get a bit more
 * air between them than a standard prose block so the four orientation
 * sentences don't feel packed. */
.redesign .checklist__panel--intro {
    font-size: 18px;
    line-height: 1.7;
}

.redesign .checklist__panel--intro p {
    margin: 0 0 16px;
}

.redesign .checklist__panel--intro p:last-child { margin-bottom: 0; }

/* Hero image at the top of the Intro tab. Full-width within the 864px
 * panel, capped at 360px tall so it reads as a banner rather than
 * dominating the page on short-content devices. `object-fit: cover`
 * keeps the framing centered regardless of source aspect ratio. */
.redesign .checklist__hero {
    margin: 0 0 32px;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;            /* kill inline-img whitespace gap */
}

.redesign .checklist__hero img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .redesign .checklist__panel--intro { font-size: 16px; }
    .redesign .checklist__hero { margin-bottom: 24px; border-radius: 10px; }
    .redesign .checklist__hero img { max-height: 240px; }
}

/* ── Tabs ── */
.redesign .checklist-tabs {
    max-width: 1024px;
    margin: 0 auto;
    padding-inline: 32px;
    text-align: center;
}

@media (max-width: 768px) {
    .redesign .checklist-tabs { padding-inline: 20px; }
}

/* easytabs requires the nav `<ul>` to be a direct child of `.tabs`; do
 * NOT wrap it in another div. easytabs adds `.active` to the matching
 * `<li>` — we target both `.active a` and `.active a:hover` to keep
 * the active state stable on hover. */
.redesign .checklist-tabs .tabs_nav.checklist-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 6px;
    margin: 0 auto 40px;
    background: var(--neutral-white);
    border: 1px solid var(--brand-border-peach);
    border-radius: 100px;
    box-shadow: 0 2px 6px rgba(85, 75, 75, 0.05);
    list-style: none;
    gap: 2px;
}

.redesign .checklist-tabs .tabs_nav.checklist-toggle li {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

.redesign .checklist-tabs .tabs_nav.checklist-toggle li a,
.redesign .checklist-tabs .tabs_nav.checklist-toggle li.active a,
.redesign .checklist-tabs .tabs_nav.checklist-toggle li.active a:hover {
    display: block;
    padding: 10px 24px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--text-paragraph) !important;
    background: transparent;
    border: none !important;
    border-radius: 100px;
    text-decoration: none;
    transition: background var(--hover-dur) var(--hover-ease), color var(--hover-dur) var(--hover-ease);
    white-space: nowrap;
}

.redesign .checklist-tabs .tabs_nav.checklist-toggle li a:hover {
    color: var(--brand-sea-green) !important;
    background: var(--brand-offwhite-peach);
}

.redesign .checklist-tabs .tabs_nav.checklist-toggle li.active a,
.redesign .checklist-tabs .tabs_nav.checklist-toggle li.active a:hover,
.redesign .checklist-tabs .tabs_nav.checklist-toggle li.active a:focus {
    background: var(--brand-sea-green) !important;
    color: var(--neutral-white) !important;
    box-shadow: 0 1px 3px rgba(40, 65, 75, 0.18);
}

@media (max-width: 720px) {
    .redesign .checklist-tabs .tabs_nav.checklist-toggle {
        display: flex;
        width: 100%;
        border-radius: 16px;
    }
    .redesign .checklist-tabs .tabs_nav.checklist-toggle li { flex: 1 1 50%; }
    .redesign .checklist-tabs .tabs_nav.checklist-toggle li a,
    .redesign .checklist-tabs .tabs_nav.checklist-toggle li.active a {
        padding: 10px 8px;
        text-align: center;
        font-size: 13px;
    }
}

/* ── Tab panels ── */
.redesign .checklist__panel {
    max-width: 864px;
    margin: 0 auto;
    text-align: left;
    padding-bottom: 80px;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-paragraph);
}

.redesign .checklist__panel > p {
    margin: 0 0 16px;
}

.redesign .checklist__subhead {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 32px;
    line-height: 1.3;
    color: var(--text-heading);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-primary);
}

/* Subsequent sub-heads inside the same panel get extra top spacing so
 * sections don't crash into each other. */
.redesign .checklist__panel .checklist__subhead + * { margin-top: 0; }
.redesign .checklist__panel .checklist__subhead:not(:first-child) {
    margin-top: 56px;
}

@media (max-width: 768px) {
    .redesign .checklist__subhead {
        font-size: 26px;
    }
}

/* ── Bullet list inside a panel ── */
.redesign .checklist__list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.redesign .checklist__list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--text-paragraph);
}

.redesign .checklist__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--brand-sea-green);
    background: transparent;
}

.redesign .checklist__list li strong {
    color: var(--text-heading);
    font-weight: 600;
}

.redesign .checklist__list li a {
    color: var(--brand-sea-green);
    text-decoration: underline;
}

.redesign .checklist__list li a:hover { color: var(--brand-sea-green-darker); }

/* Two-column packing list (used by What to Pack on wider viewports). */
.redesign .checklist__list--cols {
    columns: 2;
    column-gap: 48px;
}
.redesign .checklist__list--cols li { break-inside: avoid; }

@media (max-width: 600px) {
    .redesign .checklist__list--cols { columns: 1; }
}

/* ── Checkbox rows (Preparation Checklist tab) ── */
.redesign .checklist__check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: var(--neutral-white);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    transition: border-color var(--hover-dur) var(--hover-ease), background var(--hover-dur) var(--hover-ease);
}

.redesign .checklist__check:hover {
    border-color: var(--brand-offwhite-seagreen);
    background: var(--brand-offwhite-peach);
}

.redesign .checklist__check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    /* Lock the box to a hard 22x22 square. `flex: 0 0 22px` prevents the
     * flex layout from shrinking it when the label wraps onto multiple
     * lines (which is what was producing a visually narrow / squashed
     * green box on mobile). `min-width` + `min-height` kill any legacy
     * style.css `width: auto !important` inheritance. */
    flex: 0 0 22px;
    width: 22px !important;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    margin: 2px 0 0;
    padding: 0;
    border: 1.5px solid var(--brand-sea-green);
    border-radius: 6px;
    background: var(--neutral-white);
    cursor: pointer;
    position: relative;
    transition: background var(--hover-dur) var(--hover-ease), border-color var(--hover-dur) var(--hover-ease);
}

.redesign .checklist__check input[type="checkbox"]:checked {
    background: var(--brand-sea-green);
    border-color: var(--brand-sea-green);
}

.redesign .checklist__check input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid var(--neutral-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.redesign .checklist__check label {
    flex: 1;
    cursor: pointer;
    color: var(--text-paragraph);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    /* Override legacy `style.css` rule `input[type="checkbox"] + label`
     * which sets `padding-left: 36px` to make room for a fake pseudo
     * checkbox that we explicitly don't want here. The real `<input>`
     * is a flex sibling, so no extra label padding is needed. */
    padding-left: 0;
    font-weight: 400;
}

/* Kill the legacy fake-checkbox pseudo-elements that `style.css` paints
 * onto every `input[type="checkbox"] + label`. They were producing a
 * second, smaller white outlined box next to our real green one. */
.redesign .checklist__check label::before,
.redesign .checklist__check label::after {
    display: none !important;
    content: none !important;
}

.redesign .checklist__check input[type="checkbox"]:checked ~ label {
    color: var(--text-paragraph);
    text-decoration: line-through;
    opacity: 0.7;
}

/* ── Blessing block (Mikvah Immersion tab) ── */
.redesign .checklist__blessing {
    background: var(--brand-offwhite-peach);
    border-left: 3px solid var(--brand-sea-green);
    padding: 20px 24px;
    margin: 16px 0 20px;
    border-radius: 0 8px 8px 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-heading);
}

.redesign .checklist__blessing p { margin: 0; }

.redesign .checklist__blessing--translation {
    background: var(--neutral-white);
    border-left-color: var(--brand-offwhite-seagreen);
    font-style: italic;
    color: var(--text-paragraph);
}
