/* v 260511.0412 UTC */

.brand-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 90px;
    max-width: 90px;
    overflow: hidden;
}

.brand-logo {
    max-width: 80px;
    max-height: 34px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-fallback {
    width: 100%;
    text-align: left;
    white-space: normal;
    word-break: break-word;
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; }
th { background: #f8fafc; }
.price { font-weight: bold; font-size: 1.2rem; }
.loading-row { text-align: center; padding: 24px; color: #666; font-style: italic; }
.results-controls { margin-top: 12px; text-align: center; }
.results-summary { margin-bottom: 8px; color: #666; font-size: 0.9rem; }
.show-more-btn { padding: 10px 18px; border: none; border-radius: 10px; background: #1f7ae0; color: white; cursor: pointer; font-size: 0.95rem; }
.show-more-btn:hover { background: #1667c2; }

@media (max-width: 850px) {
    table, thead, tbody, th, td, tr { display: block; }
    thead { display: none; }
    tbody tr { background: var(--card); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; padding: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.05); }
    tbody td { display: flex; justify-content: flex-start; align-items: flex-start; gap: 12px; padding: 6px 0; border: none; text-align: left; }
    tbody td::before { content: attr(data-label); font-weight: 600; color: #666; flex: 0 0 90px; }
    td.price { font-size: 1.5rem; font-weight: 700; }
    td.price::before, td[data-label=""]::before { display: none; }
    .brand-cell { width: auto; max-width: none; overflow: visible; }
    .directions { width: 100%; text-align: center; }
}

/* PPF map/list view v 260510.0558 UTC */
.view-toggle-control {
    white-space: nowrap;
    font-weight: 700;
}

.view-toggle-control.active {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #ffffff;
}

.map-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.ppf-map {
    width: 100%;
    height: min(620px, calc(100vh - 260px));
    min-height: 360px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.ppf-map-marker-shell {
    background: transparent;
    border: none;
    overflow: visible;
}

.ppf-map-marker-shell * {
    box-sizing: border-box;
}

.ppf-map-marker {
    position: relative;
    width: 82px;
    min-height: 76px;
    background: #ffffff;
    border: 2px solid #10224a;
    border-radius: 7px;
    box-shadow: 0 3px 10px rgba(16,34,74,0.28);
    text-align: center;
    overflow: visible;
}

.ppf-map-marker::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -13px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 13px solid #10224a;
}

.ppf-map-marker::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 10px solid #ffffff;
    z-index: 2;
}

.ppf-map-marker-price {
    font-size: 1.35rem;
    line-height: 1.05;
    font-weight: 800;
    padding: 7px 4px 5px;
    color: #10224a;
}

.ppf-map-marker-label {
    padding: 4px 2px;
    font-weight: 800;
    color: #ffffff;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.ppf-map-marker-logo-wrap {
    width: 100%;
    height: 34px;
    padding: 0;
    display: block;
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border-radius: 0 0 5px 5px;
    overflow: hidden;
}

.ppf-map-marker-text-logo {
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.1;
}

.ppf-map-marker-best {
    border-color: #198754;
}

.ppf-map-marker-best::after {
    border-top-color: #198754;
}

.ppf-map-marker-best .ppf-map-marker-price {
    color: #198754;
}

.ppf-map-marker-best .ppf-map-marker-label {
    background: #198754;
}

.ppf-map-marker-high {
    border-color: #a6192e;
}

.ppf-map-marker-high::after {
    border-top-color: #a6192e;
}

.ppf-map-marker-high .ppf-map-marker-price {
    color: #a6192e;
}

.ppf-map-marker-high .ppf-map-marker-label {
    background: #a6192e;
}

.ppf-map-popup {
    min-width: 190px;
}

.ppf-map-popup-price {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.ppf-map-popup-brand {
    font-weight: 800;
    margin-bottom: 5px;
}

.ppf-map-popup-address,
.ppf-map-popup-meta {
    margin-bottom: 6px;
    color: #4b5563;
}

.ppf-map-popup-directions {
    width: 100%;
    text-align: center;
    margin-top: 4px;
}

@media (max-width: 850px) {
    .view-toggle-control {
        width: 100%;
        padding: 10px 16px;
    }

    .map-wrap {
        padding: 8px;
    }

    .ppf-map {
        height: calc(100vh - 230px);
        min-height: 360px;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    .ppf-map {
        height: calc(100vh - 220px);
        min-height: 220px;
    }
}

@media (orientation: landscape) and (max-height: 430px) {
    .ppf-map {
        height: calc(100vh - 100px);
        min-height: 200px;
    }
}


/* PPF map return control and popup refinement v 260510.0558 UTC */
.ppf-map-return-control {
    margin: 0 14px 14px 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.ppf-map-return-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(16,34,74,0.24);
    background: #ffffff;
    color: #10224a;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 3px 12px rgba(0,0,0,0.22);
    cursor: pointer;
}

.ppf-map-return-btn:hover,
.ppf-map-return-btn:focus-visible {
    background: #f8fafc;
    outline: none;
}

.leaflet-popup-content .directions,
.leaflet-popup-content .directions:link,
.leaflet-popup-content .directions:visited,
.leaflet-popup-content .directions:hover,
.leaflet-popup-content .directions:active,
.leaflet-popup-content .ppf-map-popup-directions,
.leaflet-popup-content .ppf-map-popup-directions:link,
.leaflet-popup-content .ppf-map-popup-directions:visited,
.leaflet-popup-content .ppf-map-popup-directions:hover,
.leaflet-popup-content .ppf-map-popup-directions:active {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Map viewport sizing and branded controls v 260510.0515 UTC */
.map-wrap {
    padding: 10px;
}

.ppf-map {
    height: calc(100dvh - 300px);
    min-height: 420px;
    max-height: none;
}

@media (max-width: 850px) {
    .ppf-map {
        height: calc(100dvh - 260px);
        min-height: 420px;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    .ppf-map {
        height: calc(100dvh - 220px);
        min-height: 220px;
    }
}

/* PPF marker visual language */
.ppf-map-marker {
    width: 82px;
    min-height: 76px;
    border: 2px solid #10224a;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(16,34,74,0.28);
    overflow: visible;
}

.ppf-map-marker-price {
    margin: 0;
    padding: 7px 4px 6px;
    background: #10224a;
    color: #ffffff;
    border-radius: 7px 7px 0 0;
    font-size: 1.32rem;
    line-height: 1;
    font-weight: 900;
}

.ppf-map-marker-label {
    margin: 0;
    padding: 4px 2px;
    background: #10224a;
    color: #ffffff;
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ppf-map-marker-logo-wrap {
    height: 34px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #ffffff;
    border-radius: 0 0 7px 7px;
}

.ppf-map-marker::after {
    border-top-color: #10224a;
}

.ppf-map-marker-best,
.ppf-map-marker-high {
    border-color: #10224a;
}

.ppf-map-marker-best::after,
.ppf-map-marker-high::after {
    border-top-color: #10224a;
}

.ppf-map-marker-best .ppf-map-marker-price {
    background: #0f8a4c;
    color: #ffffff;
}

.ppf-map-marker-best .ppf-map-marker-label {
    background: #0b6f3c;
}

.ppf-map-marker-high .ppf-map-marker-price {
    background: #a6192e;
    color: #ffffff;
}

.ppf-map-marker-high .ppf-map-marker-label {
    background: #891526;
}

/* Google-style return-to-search control */
.ppf-map-return-control {
    margin: 0 14px 14px 0 !important;
}

.ppf-map-return-btn {
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    background: rgba(11,110,253,0.16);
    box-shadow: none;
    padding: 0;
}

.ppf-map-return-outer,
.ppf-map-return-middle,
.ppf-map-return-dot {
    display: block;
    border-radius: 50%;
}

.ppf-map-return-outer {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ppf-map-return-middle {
    width: 42px;
    height: 42px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.22);
}

.ppf-map-return-dot {
    width: 18px;
    height: 18px;
    background: #0b6efd;
    border: 3px solid #dceaff;
}

.ppf-map-return-btn:hover,
.ppf-map-return-btn:focus-visible {
    background: rgba(11,110,253,0.24);
}


/* PPF map marker blue refinement v 260510.0618 UTC */
.ppf-map-marker {
    border-color: #14528c !important;
    box-shadow: 0 4px 12px rgba(20,82,140,0.30) !important;
}

.ppf-map-marker::after {
    border-top-color: #14528c !important;
}

.ppf-map-marker-price,
.ppf-map-marker-label {
    background: #14528c !important;
    color: #ffffff !important;
}

.ppf-map-marker-best,
.ppf-map-marker-high {
    border-color: #14528c !important;
}

.ppf-map-marker-best::after,
.ppf-map-marker-high::after {
    border-top-color: #14528c !important;
}

.ppf-map-marker-best .ppf-map-marker-price {
    background: #0f8a4c !important;
}

.ppf-map-marker-best .ppf-map-marker-label {
    background: #0b6f3c !important;
}

.ppf-map-marker-high .ppf-map-marker-price {
    background: #a6192e !important;
}

.ppf-map-marker-high .ppf-map-marker-label {
    background: #891526 !important;
}


/* PPF refinement pass v 260510.0647 UTC */
.ppf-map-marker {
    border-color: #14528c !important;
    box-shadow: 0 4px 12px rgba(20,82,140,0.30) !important;
}

.ppf-map-marker::after {
    border-top-color: #14528c !important;
}

.ppf-map-marker-price,
.ppf-map-marker-label {
    background: #14528c !important;
    color: #ffffff !important;
}

.ppf-map-marker-best .ppf-map-marker-price {
    background: #0f8a4c !important;
}

.ppf-map-marker-best .ppf-map-marker-label {
    background: #0b6f3c !important;
}

.ppf-map-marker-high .ppf-map-marker-price {
    background: #a6192e !important;
}

.ppf-map-marker-high .ppf-map-marker-label {
    background: #891526 !important;
}

.ppf-map-return-btn {
    width: 58px !important;
    height: 58px !important;
    border: none !important;
    border-radius: 50% !important;
    background: rgba(11, 110, 253, 0.14) !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.ppf-map-return-outer {
    width: 58px !important;
    height: 58px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

.ppf-map-return-middle {
    width: 34px !important;
    height: 34px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}

.ppf-map-return-dot {
    width: 18px !important;
    height: 18px !important;
    background: #0b6efd !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
}

.ppf-map-return-btn:hover,
.ppf-map-return-btn:focus-visible {
    background: rgba(11, 110, 253, 0.22) !important;
}


/* Map viewport-first refinement v 260511.0018 UTC */
.ppf-map-marker.ppf-map-marker-best {
    border-color: #198754 !important;
}

.ppf-map-marker.ppf-map-marker-best::after {
    border-top-color: #198754 !important;
}

.ppf-map-marker.ppf-map-marker-best .ppf-map-marker-price,
.ppf-map-marker.ppf-map-marker-best .ppf-map-marker-label {
    background: #198754 !important;
    color: #ffffff !important;
}

.ppf-map-marker.ppf-map-marker-high {
    border-color: #b51f35 !important;
}

.ppf-map-marker.ppf-map-marker-high::after {
    border-top-color: #b51f35 !important;
}

.ppf-map-marker.ppf-map-marker-high .ppf-map-marker-price,
.ppf-map-marker.ppf-map-marker-high .ppf-map-marker-label {
    background: #b51f35 !important;
    color: #ffffff !important;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(20, 82, 140, 0.28) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background-color: #14528c !important;
    color: #ffffff !important;
    font-weight: 800;
}

/* Map viewport and stepped zoom refinement v 260511.0236 UTC */
.ppf-map-zoom-control {
    border: 1px solid rgba(16, 34, 74, 0.28) !important;
    border-radius: 7px !important;
    overflow: hidden;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}

.ppf-map-zoom-btn {
    display: block;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: #ffffff;
    color: #111827;
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}

.ppf-map-zoom-btn + .ppf-map-zoom-btn {
    border-top: 1px solid rgba(16, 34, 74, 0.22);
}

.ppf-map-zoom-btn:hover,
.ppf-map-zoom-btn:focus-visible {
    background: #f3f4f6;
    outline: none;
}

/* Map coverage control and zoom refinement v 260511.0412 UTC */
.ppf-map-coverage-control {
    margin: 0 14px 84px 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.ppf-map-coverage-btn {
    width: 58px !important;
    height: 58px !important;
    border: none !important;
    border-radius: 50% !important;
    background: rgba(16, 34, 74, 0.14) !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
}

.ppf-map-coverage-symbol {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #10224a !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}

.ppf-map-coverage-btn:hover,
.ppf-map-coverage-btn:focus-visible {
    background: rgba(16, 34, 74, 0.22) !important;
    outline: none !important;
}
