/**
 * Resource listing cards, ported from Belgard's theme stylesheet.
 *
 * The checkbox, file type and download button shortcodes carry their own styles.
 *
 * @package EchelonCore\FacetWp
 */

.fwpl-layout.resources .fwpl-result {
    padding: var(--wp--preset--spacing--xs);
    background-color: var(--global-palette9);
}

/*
 * Belgard pins the download button 45px tall to the card bottom. Echelon's Kadence button is taller and
 * grows with the viewport, so it overflowed that space. The card is a grid instead: the type and checkbox
 * share the first row, and the button sits at the bottom of the last row at whatever height it has.
 */
.fwpl-layout.resources .fwpl-row,
.fwpl-layout.resources .fwpl-col {
    height: 100%;
}

.fwpl-layout.resources .fwpl-col {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto 1fr;
    column-gap: var(--wp--preset--spacing--xxs);
}

.fwpl-layout.resources .fwpl-col > .fwpl-item {
    grid-column: 1 / -1;
}

.fwpl-layout.resources .fwpl-col > .fwpl-item:last-child {
    grid-row: -2 / -1;
    align-self: end;
    margin-top: var(--wp--preset--spacing--xs);
}

.fwpl-layout.resources .resources-download-button-wrapper {
    position: static;
    width: auto;
    height: auto;
}

.fwpl-layout.resources .fwpl-term {
    text-transform: uppercase;
    display: inline-block;
    background: var(--global-palette7);
    color: var(--global-palette3);
    font-family: var(--global-heading-font-family);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
    padding: 5px 10px;
    border: none;
}

.fwpl-layout.resources .fwpl-col > .fwpl-item.resource-types {
    grid-column: 1;
}

.fwpl-layout.resources .fwpl-col > .fwpl-item.resource-checkbox {
    grid-column: 2;
}

/* The theme's top margin on the title gives the gap below the type. */
.resources .listing-card__title {
    font-size: clamp(1.25rem, 1.1735rem + 0.3265vw, 1.5rem);
    font-family: var(--global-heading-font-family);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: var(--wp--preset--spacing--xs);
}

.resource-download-footer__actions .resource-download-footer__download-btn {
    background: var(--global-palette2);
    border: 2px solid var(--global-palette2);
    color: var(--global-palette3);
}

.resource-download-footer__actions .resource-download-footer__download-btn:hover,
.resource-download-footer__actions .resource-download-footer__download-btn:focus {
    background: var(--global-palette1);
    color: var(--global-palette9);
    border-color: var(--global-palette1);
}
