/*
 * Edgewood Records Widget — frontend styles.
 *
 * Theme-friendly: uses inherited typography and the gcid-* CSS custom
 * properties when present (Town design system per James), falling back to
 * sensible neutrals. No hard-coded fonts or font sizes outside the heading.
 */

.edgewood-records-widget {
    --edrec-border: var(--gcid-border, #e5e7eb);
    --edrec-bg: var(--gcid-card-bg, #ffffff);
    --edrec-muted: var(--gcid-muted-fg, #6b7280);
    --edrec-link: var(--gcid-link, #1d4ed8);
    --edrec-link-hover: var(--gcid-link-hover, #1e40af);
    --edrec-accent-bg: var(--gcid-accent-bg, #f3f4f6);

    background: var(--edrec-bg);
    border: 1px solid var(--edrec-border);
    border-radius: 6px;
    padding: 16px;
}

.edgewood-records-widget .edrec-heading {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.edgewood-records-widget .edrec-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.edgewood-records-widget .edrec-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--edrec-border);
}

.edgewood-records-widget .edrec-list .edrec-row:first-child {
    border-top: none;
    padding-top: 0;
}

.edgewood-records-widget .edrec-row-main {
    flex: 1;
    min-width: 0;
}

.edgewood-records-widget .edrec-title {
    display: block;
    font-weight: 500;
    color: inherit;
    text-decoration: none;
    line-height: 1.35;
    word-wrap: break-word;
}

.edgewood-records-widget .edrec-title:hover,
.edgewood-records-widget .edrec-title:focus {
    color: var(--edrec-link);
    text-decoration: underline;
}

.edgewood-records-widget .edrec-meta {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--edrec-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.edgewood-records-widget .edrec-type {
    text-transform: capitalize;
}

.edgewood-records-widget .edrec-dept {
    display: inline-block;
    padding: 1px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gcid-primary-color, #304C6F);
    background: var(--gcid-neutback01, var(--edrec-accent-bg));
    border: 1px solid var(--edrec-border);
    border-radius: 999px;
    line-height: 1.6;
}

.edgewood-records-widget .edrec-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.edgewood-records-widget .edrec-tag {
    display: inline-block;
    font-size: 0.72rem;
    color: var(--edrec-muted);
}

.edgewood-records-widget .edrec-download {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--edrec-muted);
    text-decoration: none;
    padding: 4px 8px;
    border: 1px solid var(--edrec-border);
    border-radius: 4px;
    white-space: nowrap;
}

.edgewood-records-widget .edrec-download:hover,
.edgewood-records-widget .edrec-download:focus {
    background: var(--edrec-accent-bg);
    color: inherit;
}

.edgewood-records-widget .edrec-see-all {
    margin-top: 12px;
    text-align: right;
    font-size: 0.85rem;
}

.edgewood-records-widget .edrec-see-all a {
    color: var(--edrec-link);
    text-decoration: none;
    font-weight: 500;
}

.edgewood-records-widget .edrec-see-all a:hover,
.edgewood-records-widget .edrec-see-all a:focus {
    color: var(--edrec-link-hover);
    text-decoration: underline;
}

.edgewood-records-widget .edrec-empty {
    color: var(--edrec-muted);
    margin: 0;
    font-size: 0.9rem;
}

.edgewood-records-widget.edrec-error {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #991b1b;
}

.edgewood-records-widget.edrec-error .edrec-debug {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    background: #fff;
    padding: 6px;
    border-radius: 4px;
}
