/* ==========================================================================
   preise-deutschland.css
   Aktuelle Benchinpreise Seite – /de/preise-deutschland
   ========================================================================== */

/* -----------------------------------------------------------------------
   Seitenrahmen
   ----------------------------------------------------------------------- */
.pd-page {
    padding: 10px 0 20px;
    position: relative; /* für absolut positionierten .bp-help-btn */
}

/* -----------------------------------------------------------------------
   Suchformular
   ----------------------------------------------------------------------- */
.pd-search-box {
    background: #F4F8F0;
    border: 1px solid #C8DFB4;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.pd-form-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    position: relative;
}

.pd-form-row:last-child {
    margin-bottom: 0;
}

/* Kraftstoff-Zeile etwas kleiner halten */
.pd-form-row--fuel {
    margin-top: 2px;
}

.pd-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    width: 100%;
    min-width: 100%;
    flex-shrink: 0;
    padding-top: 0;
}
@media (min-width: 640px) {
    .pd-label { width: 70px; min-width: 70px; }
}

.pd-field-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 0;
    align-items: center;
}

.pd-input {
    padding: 6px 10px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 0.875rem;
    outline: none;
    background: #fff;
    transition: border-color 0.15s;
}

.pd-input:focus {
    border-color: #7BC24A;
}

.pd-input-ort {
    flex: 1 1 300px;
    min-width: 220px;
    width: 100%;
}

.pd-select {
    padding: 6px 10px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 0.875rem;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.pd-select:focus {
    border-color: #7BC24A;
}

/* Buttons */
.pd-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, opacity 0.15s;
}

.pd-btn-primary {
    background: #7BC24A;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 16px;
}

.pd-btn-primary:hover {
    background: #6aad3c;
}

.pd-btn-primary:active {
    opacity: 0.9;
}

.pd-btn-gps {
    background: var(--color-bp-green-dark, #4A8C3D);
    color: #fff;
}

.pd-btn-gps:hover {
    background: var(--color-bp-action-dark, #2c6e2c);
}

/* Fehlermeldungen */
.pd-error {
    background: #ffeaea;
    border: 1px solid #e89898;
    border-radius: 4px;
    padding: 8px 12px;
    color: #a00;
    font-size: 0.875rem;
    margin-bottom: 12px;
    width: 100%;
}

.pd-location-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 7px 10px;
    color: #856404;
    font-size: 0.85rem;
    width: 100%;
}

/* Combobox-Wrapper */
.pd-combo-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.pd-combo-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.pd-combo-field {
    position: relative;
    flex: 1 1 300px;
    min-width: 0;
}

/* Spinner */
.pd-ort-spinner {
    display: none;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top-color: #2A7A40;
    border-radius: 50%;
    animation: pd-spin .7s linear infinite;
    pointer-events: none;
}
.pd-ort-spinner.visible { display: block; }
@keyframes pd-spin { to { transform: translateY(-50%) rotate(360deg); } }

/* Clear-Button */
.pd-ort-clear {
    display: none;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 0.85rem;
    padding: 2px 4px;
    line-height: 1;
}
.pd-ort-clear.visible { display: block; }
.pd-ort-clear:hover { color: #333; }

/* Autocomplete */
.pd-autocomplete-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    z-index: 200;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.13);
    overflow: hidden;
}

.pd-autocomplete-list li {
    display: grid;
    grid-template-columns: 1.5em 1fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    padding: 8px 12px;
    font-size: 0.875rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}
.pd-autocomplete-list li:last-child { border-bottom: none; }

.pd-autocomplete-list li:hover,
.pd-autocomplete-list li.active {
    background: #f0f7ea;
}

.pd-ac-icon {
    grid-row: 1 / 3;
    align-self: center;
    font-size: 1em;
    opacity: .75;
}
.pd-ac-main {
    color: #111;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pd-ac-main mark {
    background: none;
    color: #2A7A40;
    font-weight: 700;
}
.pd-ac-sub {
    grid-column: 2;
    color: #6b7280;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* -----------------------------------------------------------------------
   Ergebnisbereich
   ----------------------------------------------------------------------- */
.pd-results {
    /* nichts extra – fließt in .page-middle */
}

.pd-results-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 0 10px;
    border-bottom: 2px solid #EFEFEF;
    margin-bottom: 8px;
}
@media (min-width: 640px) {
    .pd-results-header { flex-direction: row; align-items: center; justify-content: space-between; }
}

.pd-results-stand {
    font-size: 0.8rem;
    color: #888;
}

.pd-results-sort {
    display: flex;
    gap: 4px;
}

.pd-sort-btn {
    padding: 4px 12px;
    border: 1px solid #bbb;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #555;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.pd-sort-btn:hover {
    background: #e8f5e0;
    border-color: #7BC24A;
    color: #2a6a00;
}

.pd-sort-btn.active {
    background: #7BC24A;
    border-color: #7BC24A;
    color: #fff;
    font-weight: 600;
}

/* -----------------------------------------------------------------------
   Stationsliste
   ----------------------------------------------------------------------- */
.pd-station-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pd-station {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-left: 3px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    transition: box-shadow 0.15s;
}
@media (min-width: 640px) {
    .pd-station { flex-wrap: nowrap; }
}

.pd-station:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pd-station--autobahn {
    border-left: 4px solid #005BAC;
}

/* Info-Spalte (links) */
.pd-station-info {
    flex: 1;
    padding: 10px 12px;
    min-width: 0;
    width: 100%;
    border-bottom: 1px solid #eee;
}
@media (min-width: 640px) {
    .pd-station-info { width: auto; border-bottom: none; }
}

.pd-station-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-station-name {
    font-size: 0.8rem;
    color: #666;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-station-address {
    font-size: 0.9rem;
    color: #555;
    margin-top: 4px;
    line-height: 1.4;
}

.pd-station-autobahn {
    margin-top: 4px;
    font-size: 0.78rem;
}

.pd-autobahn-sign {
    display: inline-block;
    background: #005BAC;
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.75rem;
}

.pd-autobahn-dir {
    color: #444;
    margin-left: 4px;
}

/* Öffnungszeiten-Spalte */
.pd-station-hours {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8px 8px;
    width: auto;
    min-width: 0;
    flex-shrink: 0;
    border-right: 1px solid #eee;
    text-align: center;
}
@media (min-width: 640px) {
    .pd-station-hours {
        padding: 10px 12px;
        width: 130px;
        min-width: 130px;
    }
}

.pd-station-open {
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}

/* Änderungs-Spalte (mitte):
   Mobil: display:contents → Kinder werden direkte Flex-Items von .pd-station
   Desktop: normaler Flex-Column wie gehabt, Kinder-Sub-Divs via display:contents unsichtbar */
.pd-station-change {
    display: contents;
}
@media (min-width: 640px) {
    .pd-station-change {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 8px 10px;
        background: #FAFAFA;
        border-left: 1px solid #eee;
        border-right: 1px solid #eee;
        flex: none;
        width: 240px;
        min-width: 240px;
        gap: 3px;
        font-size: 0.78rem;
    }
}

/* Letzte Preisänderung: mobil in Zeile mit Öffnungszeiten + Preis */
.pd-station-lastchange {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 8px 10px;
    background: #FAFAFA;
    border-right: 1px solid #eee;
    flex: 1;
    min-width: 0;
    flex-shrink: 0;
    gap: 3px;
    font-size: 0.78rem;
}
@media (min-width: 640px) {
    /* Desktop: transparent → Kinder fließen direkt in .pd-station-change */
    .pd-station-lastchange { display: contents; }
}

/* Vorhersage: mobil eigene Zeile unterhalb von Öffnungszeiten+Preisänd.+Preis */
.pd-station-forecast {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 10px;
    background: #FAFAFA;
    border-top: 1px solid #eee;
    order: 1;
    width: 100%;
    min-width: 0;
    gap: 3px;
    font-size: 0.78rem;
}
@media (min-width: 640px) {
    /* Desktop: transparent → Kinder fließen direkt in .pd-station-change */
    .pd-station-forecast { display: contents; order: 0; }
}

/* Mobil: nur Vorhersage versteckt, aufklappbar per Klick */
@media (max-width: 639px) {
    .pd-station-forecast {
        display: none;
    }
    .pd-station--open .pd-station-forecast {
        display: flex;
    }
    /* Klickbare Bereiche signalisieren */
    .pd-station-info,
    .pd-station-hours,
    .pd-station-price {
        cursor: pointer;
        user-select: none;
    }
    /* Kleiner Expand-Pfeil in der Preis-Spalte */
    .pd-station-price::after {
        content: '\25BE'; /* ▾ */
        display: block;
        font-size: 0.75rem;
        color: #aaa;
        line-height: 1;
        margin-top: 2px;
    }
    .pd-station--open .pd-station-price::after {
        content: '\25B4'; /* ▴ */
    }
}

.pd-change-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 1px;
    margin-top: 4px;
}

.pd-change-label:first-child {
    margin-top: 0;
}

.pd-change-label--forecast {
    margin-top: 6px;
    color: #666;
}

.pd-change-label--noforecast {
    font-weight: normal;
    color: #aaa;
    font-style: italic;
}

.pd-change-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 2px;
}

.pd-change-badge {
    display: inline-block;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 5px;
    width: 72px;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.pd-change-info {
    display: inline-block;
    padding: 2px 5px;
    width: auto;
    max-width: 100%;
    background: transparent;
    font-size: 0.75rem;
    color: #333;
    white-space: normal;
    word-break: break-word;
}
@media (min-width: 640px) {
    .pd-change-info { width: 105px; white-space: nowrap; word-break: normal; background: #EFEFEF; }
}

.pd-change-age {
    color: #e00;
    font-size: 0.72rem;
}

/* Preis-Spalte (rechts) */
.pd-station-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 14px;
    flex: 1;
    min-width: 80px;
    text-align: center;
    gap: 4px;
}
@media (min-width: 640px) {
    .pd-station-price { flex: none; min-width: 110px; }
}

.pd-price {
    font-size: 1.65rem;
    font-weight: 700;
    color: #4a9c20;
    white-space: nowrap;
    line-height: 1;
}

.pd-price--expensive {
    color: #BB2222;
}

.pd-price-last {
    font-size: 1rem;
    vertical-align: super;
    font-weight: 700;
}

.pd-price-diff {
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
    white-space: nowrap;
}

.pd-station-dist {
    font-size: 0.78rem;
    color: #666;
}

/* Eigene Aktions-Spalte ganz links */
.pd-station-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 12px 12px;
    min-width: 46px;
    border-right: 1px solid #eee;
    background: #fafafa;
}

.pd-station-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.pd-map-link {
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.pd-map-link:hover {
    opacity: 1;
}

/* -----------------------------------------------------------------------
   Quellenangabe + Permalink
   ----------------------------------------------------------------------- */
.pd-source {
    margin-top: 14px;
    font-size: 0.78rem;
    color: #777;
    line-height: 1.5;
}

.pd-source a {
    color: var(--color-bp-green-dark, #4A8C3D);
    text-decoration: underline;
}

.pd-permalink {
    margin-top: 16px;
    padding: 10px 14px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.82rem;
    color: #444;
    word-break: break-all;
}

.pd-permalink a {
    color: var(--color-bp-green-dark, #4A8C3D);
}

.pd-alert-box {
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--color-bp-green-xlight, #E8F5E4);
    border: 1px solid var(--color-bp-green, #62B352);
    border-radius: 4px;
}

.pd-alert-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--color-bp-green-dark, #4A8C3D);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.pd-alert-link:hover {
    text-decoration: underline;
    color: var(--color-bp-green-dark, #4A8C3D);
}

.pd-alert-link svg {
    flex-shrink: 0;
}

/* Briefumschlag-Icon pro Tankstelle */
.pd-station-alert-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-bp-green, #62B352);
    opacity: 0.8;
    transition: opacity 0.15s, color 0.15s;
    text-decoration: none;
}

.pd-station-alert-link:hover {
    opacity: 1;
    color: var(--color-bp-green-dark, #4A8C3D);
}


   ----------------------------------------------------------------------- */
/* mobile-first: Responsive-Styles jetzt als Default oben im Dokument */

/* ── Favoriten: Stern-Button ─────────────────────────────────────── */
.pd-fav-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-bp-text-muted, #aaa);
    transition: color 0.15s, transform 0.1s;
    flex-shrink: 0;
}

.pd-fav-star:hover {
    color: var(--color-bp-yellow, #f5a623);
    transform: scale(1.15);
}

.pd-fav-star--active {
    color: var(--color-bp-yellow, #f5a623);
}

.pd-fav-star--active .pd-fav-star-icon {
    fill: var(--color-bp-yellow, #f5a623);
}

.pd-fav-star .pd-fav-star-icon {
    fill: none;
}

/* ── Favoriten: Station hervorgehoben ────────────────────────────── */
.pd-station--fav {
    border-left: 6px solid var(--color-bp-yellow, #f5a623);
}

/* ── Favoriten: Filter-Button ────────────────────────────────────── */
.pd-fav-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--color-bp-border, #ddd);
    border-radius: var(--r-sm, 4px);
    background: #fff;
    color: var(--color-bp-text-muted, #888);
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.pd-fav-filter-btn:hover {
    border-color: var(--color-bp-yellow, #f5a623);
    color: var(--color-bp-yellow, #f5a623);
}

.pd-fav-filter-btn--active {
    background: var(--color-bp-yellow, #f5a623);
    border-color: var(--color-bp-yellow, #f5a623);
    color: #fff;
}

.pd-fav-filter-btn--active .pd-fav-star-icon {
    fill: #fff;
}

.pd-fav-filter-btn .pd-fav-star-icon {
    fill: none;
}

/* ── Favoriten: Alert-Button ─────────────────────────────────────── */
.pd-fav-alert-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #86efac;
    border-radius: var(--r-sm, 4px);
    background: #f0fdf4;
    color: #15803d;
    font-size: 0.82rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pd-fav-alert-btn:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

/* ── Vorhersage-Info: (*)-Button ────────────────────────────────────────── */
.pd-forecast-info-btn {
    display: inline;
    padding: 0 1px;
    margin: 0;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    font-size: 0.8em;
    cursor: pointer;
    text-decoration: underline dotted;
    opacity: 0.75;
    vertical-align: super;
    line-height: 1;
}
.pd-forecast-info-btn:hover,
.pd-forecast-info-btn:focus-visible {
    opacity: 1;
    color: var(--color-primary, #2e7d32);
    outline: none;
}

/* ── Vorhersage-Info: Modal-Inhalt ─────────────────────────────────────── */
.pd-fmi-heading {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.pd-fmi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}
.pd-fmi-table th,
.pd-fmi-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}
.pd-fmi-table thead th {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 0.82rem;
    color: #555;
}
.pd-fmi-table tfoot td {
    border-top: 2px solid #bbb;
    border-bottom: none;
    font-size: 0.9rem;
}
.pd-fmi-num {
    text-align: right !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.pd-fmi-row--exakt td:first-child::before    { content: "✅ "; }
.pd-fmi-row--richtung td:first-child::before { content: "↗ "; }
.pd-fmi-row--irrtum td:first-child::before   { content: "❌ "; }
.pd-fmi-row--fehlalarm td:first-child::before { content: "🔔 "; }

.pd-fmi-basis,
.pd-fmi-updated,
.pd-fmi-nodata {
    font-size: 0.8rem;
    color: #777;
    margin: 0.3rem 0;
}
.pd-fmi-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #555;
    border-top: 1px solid #eee;
    padding-top: 0.6rem;
}

/* ── Problem-Modal ──────────────────────────────────── */

/* Honeypot – für Bots sichtbar, für User komplett versteckt */
.pd-hp-wrap {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    width: 0;
    overflow: hidden;
    opacity: 0;
}

#pd-problem-body {
    padding: 1.4rem 1.6rem;
    overflow-y: auto;
    flex: 1;
}

#pd-problem-station {
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: var(--color-bp-green-xlight, #f0f8f0);
    border: 1px solid var(--color-bp-green-light, #b2d8b2);
    border-left: 4px solid var(--color-bp-green, #3a8a3a);
    border-radius: 6px;
}

#pd-problem-sname {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-bp-green-ui, #2d7a2d);
}

#pd-problem-saddr {
    font-size: 0.8rem;
    color: var(--color-bp-text-muted, #888);
}
