/* ── Wrapper ─────────────────────────────────────────────────────────────── */

.etb-passages-list-wrap {
    transition: opacity 0.2s ease;
}

.etb-passages-list-wrap.is-loading {
    opacity: 0.4;
    pointer-events: none;
}

/* ── Search input ─────────────────────────────────────────────────────────── */

.etb-passages-search {
    position: relative;
    margin-bottom: 1.5em;
}

.etb-passages-search__input {
    width: 100%;
    padding: 0.75em 2.8em 0.75em 1.1em;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 25px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.etb-passages-search__input:focus {
    border-color: var(--bb-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.etb-passages-search__icon {
    position: absolute;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    pointer-events: none;
    display: flex;
}

.etb-passages-search__clear {
    position: absolute;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.4;
    font-size: 1.1em;
    line-height: 1;
    display: none;
    transition: opacity 0.15s ease;
}

.etb-passages-search__clear:hover {
    opacity: 0.8;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */

.etb-passages-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5em;
}

@media (max-width: 1024px) {
    .etb-passages-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .etb-passages-list {
        grid-template-columns: 1fr;
    }
}

/* ── Item card (fully clickable via pseudo-element overlay) ──────────────── */

.etb-passages-list__item {
    position: relative;
    background: #ffffff;
    box-shadow: 1px 1px 12px -3px rgba(0, 0, 0, 0.2);
    padding: 1.1em;
    border-radius: 25px;
    transition: box-shadow 0.2s ease;
}

.etb-passages-list__item:hover {
    box-shadow: 1px 4px 18px -3px rgba(0, 0, 0, 0.25);
}

.etb-passages-list__item a {
    text-decoration: none;
    color: inherit;
}

/* Stretch the link to cover the entire card */
.etb-passages-list__item a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 25px;
}

/* No results message */
.etb-passages-list__no-results {
    grid-column: 1 / -1;
    text-align: center;
    opacity: 0.5;
    padding: 2em 0;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */

.etb-passages-pagination {
    margin-top: 2em;
}

.etb-passages-pagination__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    flex-wrap: wrap;
}

.etb-passages-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2em;
    height: 2.2em;
    padding: 0 0.5em;
    border-radius: 8px;
    font-size: 0.95em;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}

a.etb-passages-pagination__link:hover {
    background: rgba(0, 0, 0, 0.07);
}

.etb-passages-pagination__item--active .etb-passages-pagination__link {
    background: var(--bb-primary-color);
    color: #fff;
    font-weight: 600;
    cursor: default;
}

.etb-passages-pagination__item--disabled .etb-passages-pagination__link {
    opacity: 0.3;
    cursor: default;
}

.etb-passages-pagination__item--dots span {
    padding: 0 0.25em;
    opacity: 0.5;
}
