/**
 * RackTrack — Bylaws widget (front end).
 * Structural + responsive. Numbering/markers come from the rendered markup.
 * @since 1.35.0
 */
.rt-byl {
    box-sizing: border-box;
    max-width: 900px;
    margin: 0 auto;
    color: inherit;
}
.rt-byl * { box-sizing: border-box; }

/* Header (logos + heading) */
.rt-byl-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.rt-byl-logo { display: block; width: auto; height: auto; max-width: 100%; }
.rt-byl-title { text-align: center; margin: 6px 0 4px; font-weight: 800; line-height: 1.1; }

/* Toolbar: search + download */
.rt-byl-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0 18px;
}
.rt-byl-search { flex: 1; min-width: 200px; position: relative; }
.rt-byl-search-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cfd4dc;
    border-radius: 8px;
    font-size: 15px;
}
.rt-byl-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    background: #2c3e50;
}
.rt-byl-download[disabled] { opacity: .6; cursor: default; }

/* Contact block */
.rt-byl-contact {
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: rgba(0, 0, 0, .02);
}
.rt-byl-contact h4 { margin: 0 0 6px; }
.rt-byl-contact-links { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* Sections */
.rt-byl-section { margin: 0 0 26px; scroll-margin-top: 80px; }
.rt-byl-section-h {
    margin: 0 0 10px;
    font-weight: 800;
    line-height: 1.2;
}
/* Centered ALL-CAPS heading — matches a classic printed-bylaws look. */
.rt-byl-h-centered-caps {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .02em;
    font-size: clamp(16px, 2.6vw, 22px);
}
/* Left-aligned underlined heading — the alternative style. */
.rt-byl-h-left {
    text-align: left;
    border-bottom: 2px solid rgba(0, 0, 0, .12);
    padding-bottom: 4px;
    font-size: clamp(16px, 2.6vw, 22px);
}
.rt-byl-subsection { margin: 12px 0; }
.rt-byl-sub-h { margin: 0 0 6px; font-weight: 700; }
.rt-byl-sub-h.rt-byl-h-centered-caps { text-align: center; text-transform: uppercase; letter-spacing: .02em; font-size: clamp(14px, 2vw, 17px); }
.rt-byl-sub-h.rt-byl-h-left { text-align: left; text-transform: none; }

/* Per-block justification (set from the toolbar on a text or list block). */
.rt-byl-text.rt-byl-align-left    { text-align: left; }
.rt-byl-text.rt-byl-align-center  { text-align: center; }
.rt-byl-text.rt-byl-align-right   { text-align: right; }
.rt-byl-text.rt-byl-align-justify { text-align: justify; }
/* Lists are flex rows, so alignment shifts the rows. */
.rt-byl-list.rt-byl-align-center .rt-byl-li { justify-content: center; }
.rt-byl-list.rt-byl-align-right .rt-byl-li  { justify-content: flex-end; }

/* Content blocks */
.rt-byl-text { margin: 8px 0; line-height: 1.55; }
.rt-byl-figure { margin: 10px 0; }
.rt-byl-img { display: block; height: auto; max-width: 100%; border-radius: 6px; }
.rt-byl-caption { font-size: 13px; color: #6b7280; margin-top: 4px; }

/* Lists (custom marker + text, indent handled inline) */
.rt-byl-list { list-style: none; margin: 6px 0; padding: 0; }
.rt-byl-li { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0; line-height: 1.5; }
.rt-byl-marker { flex: 0 0 auto; min-width: 26px; font-weight: 700; }
.rt-byl-ball { width: 20px; height: 20px; vertical-align: middle; }
.rt-byl-li-text { flex: 1; min-width: 0; }

/* Search highlight + no-results */
.rt-byl-hl { background: #ffe066; color: inherit; padding: 0 1px; border-radius: 2px; }
.rt-byl-noresults { color: #6b7280; font-style: italic; padding: 10px 0; }

/* Last-updated footer */
.rt-byl-updated {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, .1);
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

/* Operator-only empty hint */
.rt-byl-empty { color: #888; font-style: italic; text-align: center; padding: 20px; }

@media (max-width: 600px) {
    .rt-byl-toolbar { gap: 8px; }
    .rt-byl-download { width: 100%; justify-content: center; }
    .rt-byl-li { gap: 6px; }
}
