/* County pages: "Businesses for Sale in <County>" table. The details popup is listing-details-modal.css. */

.county-listings {
    --cl-green: #0f4d2a;
    --cl-orange: #00461C;
    --cl-line: #e8f5ee;
    /* Same stripe colour and padding as the page's .selling-process--stripe sections. */
    padding: 60px 20px;
    background: #e8f5ee;
    color: #2a2a2a;
}

/* Title + lede come from the page's own .section-mini-title / .sp-section-lede. */
.county-listings .sp-section-lede {
    margin-bottom: 24px;
}

/* Same 1260px column as the section heading above it. */
.county-listings__inner {
    max-width: 1260px;
    margin: 0 auto;
}

.county-listings__filter {
    margin-bottom: 22px;
}

.county-listings__filter-label {
    display: block;
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.county-listings__filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
}

.county-listings__select-wrap {
    position: relative;
    flex: 0 1 640px;
    min-width: 0;
}

.county-listings__select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 20px;
    width: 9px;
    height: 9px;
    border-right: 2px solid #1f2937;
    border-bottom: 2px solid #1f2937;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.county-listings__select {
    width: 100%;
    padding: 13px 48px 13px 22px;
    color: #111827;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    background: #fff;
    border: 2px solid var(--cl-green);
    border-radius: 6px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.county-listings__select:focus-visible {
    outline: 3px solid rgba(0, 70, 28, 0.35);
    outline-offset: 2px;
}

.county-listings__filter-help {
    margin: 0;
    color: #4b5563;
    font-size: 15px;
}

.county-listings__table-wrap {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--cl-line);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.county-listings__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.county-listings__table[hidden] {
    display: none;
}

.county-listings__table th {
    padding: 14px 28px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    background: var(--cl-green);
}

.county-listings__table th + th {
    border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.county-listings__table td {
    padding: 6px 28px;
    color: #1f2937;
    vertical-align: middle;
    border-top: 1px solid var(--cl-line);
}

.county-listings__table tbody tr:nth-child(even) td {
    background: #fafcfb;
}

.county-listings__table .cl-num {
    width: 18%;
    text-align: center;
    white-space: nowrap;
}

.county-listings__table .cl-center {
    width: 16%;
    text-align: center;
}

.cl-name__text {
    margin-right: 10px;
}

.cl-badge {
    display: inline-block;
    padding: 3px 10px;
    color: var(--cl-orange);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    background: #fdece4;
    border-radius: 4px;
}

.cl-view {
    padding: 2px 0;
    color: var(--cl-orange);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    background: none;
    border: 0;
    cursor: pointer;
}

.cl-view:hover {
    color: #b2350f;
}

.cl-view:focus-visible,
.cl-page:focus-visible {
    outline: 3px solid rgba(0, 70, 28, 0.45);
    outline-offset: 2px;
}

.county-listings__empty {
    margin: 0;
    padding: 28px 20px;
    color: #4b5563;
    text-align: center;
}

.county-listings__pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.cl-page {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    color: var(--cl-green);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    background: #fff;
    border: 1px solid #cfe3d7;
    border-radius: 6px;
    cursor: pointer;
}

.cl-page:hover:not(:disabled):not([aria-current]) {
    background: #e8f5ee;
    border-color: var(--cl-green);
}

.cl-page[aria-current="page"] {
    color: #fff;
    background: var(--cl-green);
    border-color: var(--cl-green);
    cursor: default;
}

.cl-page:disabled {
    opacity: 0.45;
    cursor: default;
}

.cl-page-gap {
    padding: 0 4px;
    color: #6b7280;
}

.county-listings__updated {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
}

/* ---- Small screens: rows become cards ---- */
@media (max-width: 720px) {
    .county-listings {
        padding: 40px 16px 44px;
    }

    .county-listings__table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .county-listings__table,
    .county-listings__table tbody,
    .county-listings__table tr,
    .county-listings__table td {
        display: block;
        width: auto !important;
    }

    .county-listings__table tr {
        padding: 12px 16px;
        border-top: 1px solid var(--cl-line);
    }

    .county-listings__table tbody tr:first-child {
        border-top: 0;
    }

    .county-listings__table td,
    .county-listings__table tbody tr:nth-child(even) td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 4px 0;
        text-align: right !important;
        background: none;
        border: 0;
    }

    .county-listings__table td::before {
        content: attr(data-label);
        color: #6b7280;
        font-size: 14px;
        text-align: left;
    }

    .county-listings__table td.cl-name {
        display: block;
        padding-bottom: 6px;
        font-weight: 600;
        text-align: left !important;
    }

    .county-listings__table td.cl-name::before {
        content: none;
    }

    .cl-name__text {
        display: block;
        margin: 0 0 4px;
    }
}

@media print {
    .county-listings__filter,
    .county-listings__pager {
        display: none !important;
    }
}
