/* Disclosure: a section whose title row opens and closes its body.
   The macro is components/layout/disclosure.html (2026-11-24).

   Native <details>/<summary>: the browser owns opening, closing, the keyboard
   and the accessible state. This file only draws it. Flat: a hairline border,
   no shadow, no fill change on the open state. */

.disclosure {
    border: 1px solid var(--border-base);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}

.disclosure-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--fg-1);
}

/* The browser's own triangle: gone, the chevron replaces it. */
.disclosure-summary::-webkit-details-marker {
    display: none;
}

.disclosure-summary:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: -2px;
    border-radius: var(--radius-lg);
}

.disclosure-chevron {
    display: inline-flex;
    color: var(--fg-4);
    transform: rotate(-90deg);
    transition: transform 0.15s ease;
}

.disclosure[open] > .disclosure-summary .disclosure-chevron {
    transform: rotate(0deg);
}

.disclosure-note {
    font-weight: var(--fw-regular);
    color: var(--fg-4);
}

.disclosure-body {
    border-top: 1px solid var(--border-base);
}

/* One of a stack inside a card (disclosure(flush=true)): the card draws the
   frame, so each row has only a rule above it, and the title row tints on
   hover like a list row. */
.disclosure--flush {
    border: 0;
    border-top: 1px solid var(--status-neutral-bg); /* the .border-faint shade */
    border-radius: 0;
    background: transparent;
}

.disclosure--flush:first-child {
    border-top: 0;
}

.disclosure--flush > .disclosure-summary {
    padding: 0.75rem 1.5rem;
}

.disclosure--flush > .disclosure-summary:hover {
    background: var(--bg-page);
}

/* A title row from the call block (disclosure(summary_slot=true)): it takes
   the rest of the row and keeps its own weights. */
.disclosure-title--slot {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-weight: inherit;
}
