/**
 * ASHA Resource Manager — Resource List Styles (v1.2)
 *
 * Intentionally minimal. Typography, colors, and spacing should be
 * controlled by each site's global Elementor / theme CSS.
 */

/* ── List reset ───────────────────────────────────────────────────── */
.asha-resource-list__items {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── Individual resource item ─────────────────────────────────────── */
.asha-resource-list__item {
    padding: 0.75em 0;
    border-bottom: 1px solid currentColor;
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.asha-resource-list__item:last-child {
    border-bottom: none;
}

/* ── Title link ───────────────────────────────────────────────────── */
.asha-resource-list__title a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.asha-resource-list__title a:hover,
.asha-resource-list__title a:focus-visible {
    text-decoration: none;
}

/* ── Badges ───────────────────────────────────────────────────────── */
.asha-resource-list__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35em;
    margin-top: 0.35em;
}

.asha-resource-list__badge {
    display: inline-block;
    padding: 0.15em 0.55em;
    font-size: 0.75em;
    line-height: 1.4;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* ── Description ──────────────────────────────────────────────────── */
.asha-resource-list__description {
    margin-top: 0.35em;
    font-size: 0.9em;
    opacity: 0.85;
}

.asha-resource-list__description p:last-child {
    margin-bottom: 0;
}

/* ── Collection headings ──────────────────────────────────────────── */
.asha-resource-collection__heading {
    margin-top: 1.5em;
    margin-bottom: 0.25em;
}

.asha-resource-collection__heading:first-child {
    margin-top: 0;
}

.asha-resource-collection__description {
    margin-top: 0;
    margin-bottom: 0.5em;
    opacity: 0.85;
}

/* ── Non-ASHA / Additional Resources heading ──────────────────────── */
.asha-resource-list__non-asha-heading {
    margin-top: 1.5em;
    margin-bottom: 0.25em;
}

/* ── Format sub-headings ──────────────────────────────────────────── */
.asha-resource-list__format-heading {
    margin-top: 1em;
    margin-bottom: 0.25em;
}

/* ── Featured image ───────────────────────────────────────────────── */
.asha-resource-list__image {
    border-radius: 3px;
    object-fit: cover;
}

/* ── ACF custom fields (inline with dividers) ─────────────────────── */
.asha-resource-list__acf-fields {
    margin-top: 0.35em;
    font-size: 0.85em;
    line-height: 1.6;
}

.asha-resource-list__acf-item {
    white-space: nowrap;
}

.asha-resource-list__acf-label {
    font-weight: 600;
}

.asha-resource-list__acf-divider {
    opacity: 0.4;
    margin: 0 0.1em;
}

/* ── Collapsible sections (native <details>) ──────────────────────── */
.asha-resource-list__collapsible {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin-top: 0.75em;
}

.asha-resource-list__collapsible-summary {
    cursor: pointer;
    padding: 0.5em 0.75em;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

/* Custom triangle indicator */
.asha-resource-list__collapsible-summary::before {
    content: '▸';
    display: inline-block;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.asha-resource-list__collapsible[open] > .asha-resource-list__collapsible-summary::before {
    transform: rotate(90deg);
}

/* Remove default marker in browsers that support it */
.asha-resource-list__collapsible-summary::-webkit-details-marker {
    display: none;
}

.asha-resource-list__collapsible-summary::marker {
    content: '';
}

/* Heading inside summary should be inline, no extra margin */
.asha-resource-list__format-heading--inline {
    margin: 0;
    display: inline;
}

.asha-resource-list__collapsible-content {
    padding: 0 0.75em 0.5em;
}

/* ── Empty state ──────────────────────────────────────────────────── */
.asha-resource-list__empty {
    font-style: italic;
    opacity: 0.7;
}
