/* ==========================================================================
   preise-staedte.css – Benzinpreise nach Städten / /de/preise-staedte
   ========================================================================== */

.ps-page {
    padding: 10px 0 40px;
}

.ps-heading__filter {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2a5a0e;
    background: #edf7e5;
    border: 1px solid #b0d090;
    border-radius: 4px;
    padding: 2px 10px;
}

/* -----------------------------------------------------------------------
   Navigation (Buchstaben + Bundesländer)
   ----------------------------------------------------------------------- */
.ps-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    padding: 8px 10px;
    background: #f4f8f0;
    border: 1px solid #c8dfb4;
    border-radius: 6px;
}

.ps-nav--bl {
    margin-bottom: 18px;
}

.ps-nav__label {
    font-size: 0.75rem;
    color: #777;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-right: 4px;
    white-space: nowrap;
    min-width: 80px;
}

.ps-nav__item {
    display: inline-block;
    font-size: 0.82rem;
    color: #3a6e1a;
    text-decoration: none;
    padding: 3px 7px;
    border: 1px solid #b0d090;
    border-radius: 3px;
    background: #fff;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
    line-height: 1.4;
}

.ps-nav__item:hover {
    background: #3a6e1a;
    color: #fff;
    border-color: #3a6e1a;
}

.ps-nav__item.is-active {
    background: #3a6e1a;
    color: #fff;
    border-color: #2a5a0e;
    font-weight: 700;
    cursor: default;
}

.ps-nav__item--bl {
    font-size: 0.76rem;
    padding: 2px 5px;
    letter-spacing: 0.02em;
}

/* -----------------------------------------------------------------------
   Ergebnis-Header
   ----------------------------------------------------------------------- */
.ps-result-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    align-items: baseline;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #555;
}

.ps-result-count {
    font-weight: 700;
    color: #2c5f2e;
}

.ps-result-stand {
    color: #777;
}

.ps-result-avg {
    color: #555;
    font-size: 0.82rem;
}

/* -----------------------------------------------------------------------
   Tabelle
   ----------------------------------------------------------------------- */
.ps-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ps-table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    font-size: 0.87rem;
}

.ps-table thead tr {
    background: #2c5f2e;
    color: #fff;
}

.ps-table th {
    padding: 0.5rem 0.6rem;
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
}

.ps-table th.ps-col-name,
.ps-table td.ps-col-name {
    text-align: left;
}

.ps-table td {
    padding: 0.3rem 0.6rem;
    border-bottom: 1px solid #e8eedf;
    vertical-align: middle;
    text-align: right;
}

.ps-table tbody tr:nth-child(even) {
    background: #f7faf3;
}

.ps-table tbody tr:hover {
    background: #edf7e5;
}

.ps-col-name a {
    color: #1a5a08;
    text-decoration: none;
}

.ps-col-name a:hover {
    text-decoration: underline;
}

/* Delta-Spalte */
.ps-col-delta {
    font-weight: 600;
    font-size: 0.83rem;
    min-width: 62px;
    width: 62px;
    white-space: nowrap;
}

.ps-col-delta.is-cheap {
    color: #1a7a00;
}

.ps-col-delta.is-expensive {
    color: #c0000a;
}

/* Balken-Spalte */
.ps-col-bar {
    width: 140px;
    min-width: 100px;
    padding: 0.3rem 0.6rem;
    vertical-align: middle;
}

/* Butterfly-Balken */
.ps-bar {
    display: flex;
    width: 100%;
    height: 10px;
    border-radius: 2px;
    overflow: hidden;
    background: #e8eee4;
    position: relative;
}

.ps-bar::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}

.ps-bar__left {
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: flex-end;
}

.ps-bar__right {
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: flex-start;
}

.ps-bar__fill {
    height: 100%;
}

.ps-bar__fill.is-cheap {
    background: #1a7a00;
}

.ps-bar__fill.is-expensive {
    background: #c0000a;
}

.ps-col-price {
    min-width: 58px;
    font-variant-numeric: tabular-nums;
}

.ps-col-price.is-zero {
    color: #aaa;
}

/* -----------------------------------------------------------------------
   Hinweis-Box
   ----------------------------------------------------------------------- */
.ps-hint {
    background: #f4f8f0;
    border: 1px solid #c8dfb4;
    border-radius: 6px;
    padding: 18px 20px;
    color: #555;
    font-size: 0.9rem;
    margin-top: 8px;
}

.ps-hint--empty {
    border-color: #e0b87a;
    background: #fdf7ee;
    color: #7a5a20;
}

.ps-unit {
    font-size: 0.78rem;
    color: #888;
    text-align: right;
    margin-top: 6px;
    margin-bottom: 0;
}

/* -----------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------- */
/* Klickbare Zeilen */
.ps-row {
    cursor: pointer;
}

.ps-row:hover td {
    background: #dff0d4 !important;
}

.ps-row.is-open td {
    background: #d4eac8 !important;
    font-weight: 600;
}

/* Detail-Zeile */
.ps-detail-row td {
    padding: 0;
    background: #f0f7ea;
    border-bottom: 2px solid #7db85a;
}

/* -----------------------------------------------------------------------
   Detail-Panel (psd-*)
   ----------------------------------------------------------------------- */
.psd-panel {
    padding: 14px 16px 16px;
}

.psd-loading,
.psd-error {
    padding: 12px 16px;
    font-size: 0.88rem;
    color: #666;
}

.psd-error { color: #a00; }

/* Zusammenfassung */
.psd-summary {
    font-size: 0.88rem;
    color: #444;
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.psd-summary__sep { color: #aaa; }

.psd-summary__offen {
    color: #1a7a00;
    font-weight: 600;
}

.psd-summary__stand {
    color: #888;
    font-size: 0.82rem;
}

/* Abschnitte */
.psd-section {
    margin-bottom: 14px;
}

.psd-section__title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 3px;
}

.psd-section__title--cheap {
    background: #e5f5dc;
    color: #1a5a08;
}

.psd-section__title--expensive {
    background: #fde8e8;
    color: #900;
}

/* Zwei Spalten für billigste / teuerste */
.psd-sections-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 860px) {
    .psd-sections-wrap {
        grid-template-columns: 1fr;
    }
}

/* Tabellen */
.psd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
}

.psd-table thead tr {
    background: #4a7c30;
    color: #fff;
}

.psd-table thead tr:hover {
    background: #4a7c30;
}

.ps-table thead tr:hover {
    background: #2c5f2e;
}

.psd-table th {
    padding: 0.35rem 0.55rem;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.psd-table th.psd-label,
.psd-table th.psd-ts-marke { text-align: left; }

.psd-table td {
    padding: 0.28rem 0.55rem;
    border-bottom: 1px solid #ddeece;
    text-align: right;
    vertical-align: top;
}

.psd-table tbody tr:nth-child(even) { background: #f5faf0; }
.psd-table tbody tr:hover            { background: #eaf5e0; }

.psd-label {
    text-align: left !important;
    color: #555;
    white-space: nowrap;
}

.psd-ts-marke {
    text-align: left !important;
    color: #222;
    font-weight: 600;
}

.psd-ts-marke small {
    display: block;
    font-weight: 400;
    color: #666;
    font-size: 0.78rem;
    padding-left: 26px;
}

.psd-delta.is-cheap    { color: #1a7a00; font-weight: 600; }
.psd-delta.is-expensive { color: #c0000a; font-weight: 600; }

.psd-offen       { color: #1a7a00; font-size: 0.75rem; white-space: nowrap; }
.psd-geschlossen { color: #999;    font-size: 0.75rem; white-space: nowrap; }

.psd-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    margin-right: 6px;
    flex-shrink: 0;
    vertical-align: middle;
}
.psd-rank--cheap     { background: #1a7a00; }
.psd-rank--expensive { background: #c0000a; }
.psd-ts-addr { vertical-align: middle; }

.psd-footer {
    margin-top: 10px;
    font-size: 0.78rem;
    color: #888;
    text-align: right;
    border-top: 1px solid #d4e8c0;
    padding-top: 6px;
}

/* -----------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------- */
@media (max-width: 600px) {
    .ps-nav__label {
        min-width: unset;
        width: 100%;
    }
    .ps-result-header {
        flex-direction: column;
        gap: 4px;
    }
    .ps-table th,
    .ps-table td {
        padding: 0.28rem 0.4rem;
        font-size: 0.82rem;
    }
}
