/* =========================================================
   Moderní společný výpis inzerátů
   ========================================================= */

#content.listing-page #items {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    gap: 10px;
    padding-top: 8px;
}

#content.listing-page #listavypis {
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: #f1f3f5;
    color: var(--pb-muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
}

#content.listing-page #listavypis td {
    box-sizing: border-box;
    padding: 7px 10px;
}

#content.listing-page #items .listing-card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 13px 12px;
    border: 1px solid #e3e6e9;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 11px rgba(24, 30, 38, .045);
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

#content.listing-page #items .listing-card:hover {
    border-color: #ffc49b;
    background: #fff;
    box-shadow: 0 7px 18px rgba(24, 30, 38, .085);
    transform: translateY(-1px);
}

#content.listing-page #items .listing-card table {
    width: 100%;
    table-layout: fixed;
}

#content.listing-page #items .listing-card .tabulka {
    width: 64%;
    padding-right: 14px;
    vertical-align: top;
}

#content.listing-page #items .listing-card .tabulka::after {
    display: block;
    clear: both;
    content: "";
}

#content.listing-page #items .listing-card .tabulka > a {
    display: block;
    float: left;
}

#content.listing-page #items .listing-card h3 {
    margin: 0 0 7px;
    padding: 0;
    color: var(--pb-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.35;
}

#content.listing-page #items .listing-card h3 p {
    margin: 0;
}

#content.listing-page #items .listing-card h3 a {
    color: var(--pb-text);
}

#content.listing-page #items .listing-card h3 span {
    display: inline-block;
    margin-top: 3px;
    color: #747a80;
    font-size: 12px !important;
}

#content.listing-page #items .listing-card .img {
    box-sizing: border-box;
    width: 142px;
    max-width: 142px;
    height: 102px;
    margin: 3px 12px 2px 0;
    border: 1px solid #e5e7e9;
    border-radius: 9px;
    object-fit: cover;
    background: #f4f5f6;
}

#content.listing-page #items .listing-card .text {
    display: -webkit-box;
    min-width: 0;
    padding-top: 4px;
    overflow: hidden;
    color: #4f555b;
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

#content.listing-page #items .listing-card .textmobil {
    display: none;
}

#content.listing-page #items .listing-card .price,
#content.listing-page #items .listing-card .misto,
#content.listing-page #items .listing-card .type {
    box-sizing: border-box;
    padding: 6px 8px;
    color: #42474c;
    font-size: 13px;
    line-height: 1.5;
}

#content.listing-page #items .listing-card .price {
    color: #b84a00;
    font-size: 14px;
    font-weight: 800;
}

#content.listing-page #items .listing-card .misto {
    color: #555b61;
}

#content.listing-page #items .listing-card .type {
    color: #7a8086;
    font-size: 12px;
}

#content.listing-page #items .listing-card .tools,
#content.listing-page #items .listing-card > span:not(.cl) {
    display: inline-flex;
    gap: 5px;
    margin-top: 7px;
    visibility: visible;
}

#content.listing-page #items .listing-card .tools a,
#content.listing-page #items .listing-card > span:not(.cl) a {
    display: inline-block;
    padding: 5px 9px;
    border: 1px solid #dfe2e5;
    border-radius: 7px;
    background: #f7f8f9;
    color: #34383c;
    font-size: 12px;
    font-weight: 700;
}

#content.listing-page #pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    padding: 15px 4px 24px;
}

#content.listing-page #pages a {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid #d9dde1;
    border-radius: 8px;
    background: #f5f6f7;
    color: #30343a;
    font-size: 14px;
    font-weight: 750;
    line-height: 1;
}

#content.listing-page #pages a.active,
#content.listing-page #pages a.activelong {
    border-color: #e76612;
    background: var(--pb-orange);
    color: #fff;
}

#content.listing-page #pages a:hover,
#content.listing-page #pages a:focus-visible {
    border-color: #ffad75;
    background: #fff3ea;
    color: var(--pb-text);
    outline: none;
}

@media screen and (max-width: 700px) {
    #content.listing-page #items {
        gap: 9px;
        padding-top: 6px;
    }

    #content.listing-page #listavypis {
        display: none;
    }

    #content.listing-page #items .listing-card {
        padding: 11px 10px;
        border-radius: 11px;
    }

    #content.listing-page #items .listing-card table,
    #content.listing-page #items .listing-card tbody {
        display: block;
        width: 100%;
    }

    #content.listing-page #items .listing-card tr:first-child {
        display: grid;
        grid-template-columns: clamp(180px, 58%, 280px) minmax(0, 1fr);
        grid-template-rows: auto auto auto 1fr;
        gap: 7px 11px;
        width: 100%;
    }

    #content.listing-page #items .listing-card .tabulka {
        display: contents;
        padding: 0;
    }

    #content.listing-page #items .listing-card .tabulka::after {
        display: none;
    }

    #content.listing-page #items .listing-card h3 {
        grid-column: 1 / -1;
        grid-row: 1;
        margin-bottom: 8px;
        font-size: 16px;
    }

    #content.listing-page #items .listing-card .tabulka > a {
        display: block;
        float: none;
        grid-column: 1;
        grid-row: 2 / 5;
        align-self: start;
    }

    #content.listing-page #items .listing-card .img {
        display: block;
        width: 100%;
        max-width: none;
        height: auto;
        max-height: none;
        aspect-ratio: auto;
        margin: 0;
        float: none;
        object-fit: contain;
    }

    #content.listing-page #items .listing-card .text {
        display: none;
    }

    #content.listing-page #items .listing-card .price,
    #content.listing-page #items .listing-card .misto {
        display: block;
        width: 100%;
        min-width: 0;
        padding: 8px 10px;
        border-radius: 8px;
        background: #f6f7f8;
        text-align: center;
    }

    #content.listing-page #items .listing-card .misto {
        grid-column: 2;
        grid-row: 2;
    }

    #content.listing-page #items .listing-card .price {
        grid-column: 2;
        grid-row: 3;
        align-self: stretch;
    }

    #content.listing-page #items .listing-card .type {
        display: none;
    }

    #content.listing-page #items .listing-card tr:nth-child(2) {
        display: block;
        clear: both;
    }

    #content.listing-page #items .listing-card tr:nth-child(2) td {
        display: block;
        padding: 8px 0 0;
    }

    #content.listing-page #items .listing-card .textmobil {
        display: block;
        color: #555b61;
        font-size: 13px;
        line-height: 1.5;
    }

    #content.listing-page #items .listing-card tr:nth-child(n+3) {
        display: none;
    }

    #pages {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 7px;
        padding: 15px 4px 24px;
    }

    #pages a,
    #pages a.active,
    #pages a.activelong,
    #pages a.long,
    #pages a.arrow {
        box-sizing: border-box;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        min-height: 40px;
        margin: 0;
        padding: 7px 11px;
        border: 1px solid #d9dde1;
        border-radius: 9px;
        background: #f5f6f7;
        color: #30343a;
        font-size: 15px;
        font-weight: 750;
        line-height: 1;
        box-shadow: 0 2px 6px rgba(24, 30, 38, .05);
    }

    #pages a.active,
    #pages a.activelong {
        border-color: #e76612;
        background: var(--pb-orange);
        color: #fff;
    }

    #pages a:hover,
    #pages a:focus-visible {
        border-color: #ffad75;
        background: #fff3ea;
        color: var(--pb-text);
        outline: none;
    }
}

/* =========================================================
   Kompaktní filtry výpisů
   ========================================================= */

.listing-filters {
    position: relative;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin: 9px 0 12px;
}

.listing-filter-direct {
    position: relative;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 91px;
    min-height: 40px;
    padding: 8px 34px 8px 12px;
    border: 1px solid #d9dde1;
    border-radius: 9px;
    background: #fff;
    color: #30343a;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.2;
    box-shadow: 0 2px 7px rgba(24, 30, 38, .045);
}

.listing-filter-direct:nth-of-type(2) {
    min-width: 166px;
}

.listing-filter-direct::after {
    position: absolute;
    top: 50%;
    right: 13px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #6c7278;
    border-bottom: 2px solid #6c7278;
    content: "";
    pointer-events: none;
    transform: translateY(-70%) rotate(45deg);
}

.listing-filter-direct.is-active {
    border-color: #ff9f60;
    background: var(--pb-orange-soft);
}

.listing-filter-direct:focus-within {
    border-color: #ff8d42;
    box-shadow: 0 0 0 3px rgba(255, 122, 33, .17);
}

#content.listing-page .listing-filter-direct select {
    position: absolute;
    inset: 0;
    z-index: 2;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    cursor: pointer;
    opacity: 0;
}

.listing-filter {
    position: relative;
}

.listing-filter summary {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 39px;
    padding: 8px 12px;
    border: 1px solid #d9dde1;
    border-radius: 9px;
    background: #fff;
    color: #30343a;
    cursor: pointer;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.2;
    list-style: none;
    box-shadow: 0 2px 7px rgba(24, 30, 38, .045);
}

.listing-filter summary::-webkit-details-marker {
    display: none;
}

.listing-filter summary::after {
    width: 8px;
    height: 8px;
    border-right: 2px solid #6c7278;
    border-bottom: 2px solid #6c7278;
    content: "";
    transform: translateY(-2px) rotate(45deg);
    transition: transform .16s ease;
}

.listing-filter[open] summary {
    border-color: #ffad75;
    background: var(--pb-orange-soft);
}

.listing-filter[open] summary::after {
    transform: translateY(2px) rotate(225deg);
}

.listing-filter-panel {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    z-index: 40;
    box-sizing: border-box;
    width: 280px;
    padding: 12px;
    border: 1px solid #e0e3e6;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(24, 30, 38, .16);
}

.listing-filter-panel label {
    display: block;
    margin: 0 0 7px;
    color: #51575d;
    font-size: 12px;
    font-weight: 700;
}

#content.listing-page .listing-filter-panel select {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 7px 9px;
    border: 1px solid var(--pb-control-border);
    border-radius: 8px;
    background: #fff;
    color: var(--pb-text);
    font-size: 14px;
}

.listing-filter-reset {
    display: inline-flex;
    align-items: center;
    min-height: 39px;
    padding: 0 10px;
    color: #a43e00;
    font-size: 13px;
    font-weight: 700;
}
