/**
 * Umgebungs-POIs (OpenStreetMap) auf der Stations-Detailseite
 * Pfad: pages/station-detail/assets/surroundings.css
 * Eingebunden von: pages/station-detail/sections/scripts.php
 *
 * Styles für die Umgebungs-Kacheln innerhalb der Karte
 * "Ausstattung & Einrichtungen", das aufklappbare Orte-Panel darunter
 * und das Karten-Modal pro POI.
 */

/* ------------------------------------------------- Umgebungs-Kacheln */

/* Kachel, die es nur wegen eines Umgebungs-POIs gibt (kein gemeldetes
   Ausstattungsmerkmal) – bewusst identische Grundoptik, nur dezent
   gestrichelter Rahmen als Unterscheidung. */
.surr-tile {
    border-style: dashed;
}

.surr-tile-icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.surr-tile-clickable {
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.surr-tile-clickable:hover {
    border-color: #6ee7b7;
}

.surr-tile-active {
    border-color: #059669;
    box-shadow: 0 0 0 1px #059669 inset;
}

/* Quellenangabe für die OSM-Daten: bewusst zurückhaltend (klein, hellgrau,
   rechtsbündig) – aber lesbar, weil die Namensnennung Lizenzbedingung ist. */
.surr-attribution {
    margin: 0.5rem 0 0;
    text-align: right;
    font-size: 0.6875rem;
    line-height: 1.4;
    color: #9ca3af;
}

/* Der Rechtshinweis tritt hinter der Radius-Angabe zurück; viel heller darf er
   nicht werden, sonst wäre die Angabe nicht mehr wahrnehmbar. */
.surr-attribution a {
    color: #b6bcc7;
    text-decoration: none;
}

.surr-attribution a:hover,
.surr-attribution a:focus-visible {
    color: #6b7280;
    text-decoration: underline;
}

/* -------------------------------------------------------- Orte-Panel */

.surr-panel {
    margin-top: 0.75rem;
    border: 1px solid #a7f3d0;
    border-radius: 0.5rem;
    background: #f0fdf4;
    overflow: hidden;
}

.surr-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #a7f3d0;
}

.surr-panel-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #065f46;
}

.surr-panel-close {
    border: 0;
    background: transparent;
    color: #047857;
    font-size: 1.125rem;
    line-height: 1;
    width: 24px;
    height: 24px;
    border-radius: 9999px;
    cursor: pointer;
    flex-shrink: 0;
}

.surr-panel-close:hover {
    background: #d1fae5;
}

.surr-poi-list {
    list-style: none;
    margin: 0;
    padding: 0.25rem;
}

.surr-poi {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-size: 0.875rem;
    color: #1f2937;
    transition: background-color 0.15s ease;
}

.surr-poi:hover {
    background-color: #d1fae5;
}

.surr-poi-name {
    font-weight: 500;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.surr-poi-meta {
    color: #6b7280;
    font-size: 0.8125rem;
    flex: 1;
    white-space: nowrap;
}

.surr-poi-pin {
    color: #059669;
    flex-shrink: 0;
}

/* --------------------------------- "in der Nähe"-Button an der Kachel */

.surr-nearby-btn {
    margin-left: auto;
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
    color: #047857;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1875rem 0.5rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.surr-nearby-btn:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
}

/* --------------------------------------------------------- Karten-Modal */

.surr-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1000;
}

.surr-modal-backdrop.is-open {
    display: flex;
}

.surr-modal {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 640px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.surr-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.surr-modal-headtext {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.surr-modal-title {
    font-size: 1rem;
    color: #111827;
}

.surr-modal-sub {
    font-size: 0.8125rem;
    color: #6b7280;
}

.surr-modal-close {
    border: 0;
    background: #f3f4f6;
    color: #374151;
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease;
}

.surr-modal-close:hover {
    background: #e5e7eb;
}

.surr-modal-map {
    height: 320px;
    width: 100%;
}

@media (min-width: 640px) {
    .surr-modal-map {
        height: 380px;
    }
}

.surr-modal-foot {
    padding: 0.625rem 1rem;
    font-size: 0.75rem;
    color: #6b7280;
    border-top: 1px solid #f3f4f6;
}

/* Marker im Karten-Modal */
.surr-map-icon {
    background: transparent;
    border: 0;
}

.surr-map-pin {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.surr-map-pin-station {
    background: #059669;
    border: 2px solid #fff;
}

.surr-map-pin-poi {
    background: #1f2937;
    border: 2px solid #fff;
}
