/* Shared Leaflet map look (route search map, city map): controls, layer menu, attribution, logo, stop pins. */
.map-attr { display: flex; align-items: center; gap: 6px; max-width: calc(100vw - 80px); }
.map-attr-btn { flex: none; width: 22px; height: 22px; padding: 0; border: 1px solid rgba(0, 0, 0, 0.25); border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: #333; font: italic 700 13px/1 Georgia, serif; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.map-attr-text { order: -1; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.9); color: #333; font-size: 11px; line-height: 1.3; }
.map-attr-text a { color: inherit; }
.map-attr.collapsed .map-attr-text { display: none; }
.map-logo { margin: 0 0 8px 8px !important; padding: 4px 8px; background: rgba(255, 255, 255, 0.8); border-radius: 8px; line-height: 0; pointer-events: none; }
.map-logo img { height: 30px; width: auto; display: block; }
.map-ctl-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 4px; background: #fff; color: #2b2a29; cursor: pointer; }
.map-ctl-btn:hover { background: #f4f4f4; }
.map-ctl-btn svg { width: 18px; height: 18px; }
.leaflet-top.leaflet-right .map-exit { margin: 8px 8px 0 0; }
.map-layers { position: relative; }
.map-layers-menu { display: none; position: absolute; right: calc(100% + 8px); bottom: 0; min-width: 160px; padding: 4px; background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.map-layers.open .map-layers-menu { display: block; }
.map-layers-menu button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: #2b2a29; font: inherit; text-align: left; white-space: nowrap; cursor: pointer; }
.map-layers-menu button:hover { background: #f4f4f4; }
.map-layers-menu button[aria-checked="true"] { background: #f3efe6; font-weight: 700; }
/* Overlay switches in the layer menu (map-base.js addOverlays), e.g. the sight categories. */
.map-layers-menu { max-height: 70vh; overflow-y: auto; }
.map-layers-head { margin: 6px 4px 2px; padding: 6px 6px 2px; border-top: 1px solid #e4e0d8; color: #6a6154; font-size: 0.8em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.map-layers-menu button.map-overlay { display: flex; align-items: center; gap: 8px; }
.map-overlay-check { flex: none; width: 14px; height: 14px; box-sizing: border-box; border: 2px solid #8a8274; border-radius: 3px; }
.map-overlay[aria-checked="true"] .map-overlay-check { border-color: #2b2a29; background: #2b2a29 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 10px no-repeat; }
.map-layers-menu button.map-overlay[aria-checked="true"] { background: none; font-weight: 400; }
.map-layers-menu button.map-overlay:hover { background: #f4f4f4; }
/* the first heading (base maps) opens the menu: no rule above it */
.map-layers-menu > .map-layers-head:first-child { margin-top: 2px; padding-top: 4px; border-top: 0; }
/* Sights (js/sights.js): round pin in the category colour with the category icon. */
.sight-pin-wrap { background: none; border: 0; }
.sight-pin, .sight-swatch { display: flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 50%; color: #fff; }
.sight-pin { width: 100%; height: 100%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45); }
.sight-pin svg { width: 62%; height: 62%; }
.sight-swatch { flex: none; width: 20px; height: 20px; }
.sight-swatch svg { width: 13px; height: 13px; }
.sight-popup { font-size: 13px; line-height: 1.35; }
.sight-popup-desc { margin-top: 4px; }
/* "Vonalak" / "Legközelebbi megálló": small muted heading on its own line, content under it */
.sight-popup .sight-lines-block { display: block; margin-top: 6px; }
.sight-popup .sight-lines { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px; }
.sight-popup .sight-lines-label, .sight-popup .sight-stop-label { display: block; margin-bottom: 2px; color: #6a6154; font-size: 11px; line-height: 1.3; }
.sight-popup .sight-stop-dist { color: #6a6154; white-space: nowrap; }
.sight-popup .sight-line { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; padding: 0 5px; box-sizing: border-box; border-radius: 4px; font-size: 12px; font-weight: 700; line-height: 18px; }
/* name + address, then a separator (as on the open card of sights.html) */
.sight-popup-title { padding-bottom: 6px; border-bottom: 1px solid #e2d9c8; }
.sight-popup-stop { margin-top: 6px; }
.sight-popup-stop strong { color: #2b2a29; font-weight: 700; }
.sight-popup-photo { display: block; width: 100%; height: auto; margin: 0 0 8px; border-radius: 6px; background: #ece6da; }
.sight-popup-hours { margin-top: 4px; font-weight: 400; }
.sight-popup-hours .sight-status { font-weight: 700; }
.sight-popup-hours .sight-status.is-open,
.sight-popup-hours .sight-status.is-soon { color: #188038; }
.sight-popup-hours .sight-status.is-closed { color: #d93025; }
html[data-theme="dark"] .sight-popup-hours .sight-status.is-open,
html[data-theme="dark"] .sight-popup-hours .sight-status.is-soon { color: #81c995; }
html[data-theme="dark"] .sight-popup-hours .sight-status.is-closed { color: #f28b82; }
.sight-popup-addr { display: flex; align-items: flex-start; gap: 4px; margin-top: 2px; color: #6a6154; }
.sight-popup-addr svg { flex: none; width: 13px; height: 13px; margin-top: 2px; }
.sight-popup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sight-popup-actions a, .sight-popup-actions button { display: inline-flex; align-items: center; padding: 5px 10px; border: 1px solid #d4c4a8; border-radius: 6px; background: #f3efe6; color: #2b2a29 !important; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.sight-popup-actions .sight-popup-route { gap: 5px; background: #f9b101; border-color: #f9b101; color: #1a1400 !important; font-weight: 400; }
.sight-popup-route svg { flex: none; width: 15px; height: 15px; }
.map-error { padding: 20px; text-align: center; color: var(--ct-muted, #6a6154); }
.stop-pin-wrap { background: none; border: 0; }
.stop-pin { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; box-sizing: border-box; border-radius: 50%; background: #fff; color: #2b2a29; border: 1.5px solid #2b2a29; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.stop-pin svg { width: 70%; height: 70%; }
.stop-pin-from { background: #2e7d32; border-color: #fff; color: #fff; }
.stop-pin-to { background: #c62828; border-color: #fff; color: #fff; }
/* A line does not stop here (service alert): red X over the pin. */
.stop-pin-skip { position: relative; border-color: #c62828; }
.stop-pin-skip::before, .stop-pin-skip::after { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #c62828; box-shadow: 0 0 0 1px #fff; transform: rotate(45deg); pointer-events: none; }
.stop-pin-skip::after { transform: rotate(-45deg); }
.leaflet-tooltip .skip-note { margin-top: 2px; white-space: normal; min-width: 160px; }

/* Dark mode (css/theme.css theme variables): map controls, layer menu, attribution and the sight popup.
   The light look above stays as it is. */
html[data-theme="dark"] .leaflet-bar { border-color: var(--ct-border); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .map-ctl-btn,
html[data-theme="dark"] .leaflet-bar a { background: var(--ct-elevated); color: var(--ct-text); }
html[data-theme="dark"] .leaflet-bar a { border-bottom-color: var(--ct-border); }
html[data-theme="dark"] .map-ctl-btn:hover,
html[data-theme="dark"] .leaflet-bar a:hover { background: var(--ct-border); color: var(--ct-gold-hover); }
html[data-theme="dark"] .leaflet-bar a.leaflet-disabled { background: var(--ct-elevated); color: var(--ct-muted); opacity: 0.55; }
html[data-theme="dark"] .map-attr-btn { border-color: var(--ct-border); background: var(--ct-elevated); color: var(--ct-text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .map-attr-btn:hover { border-color: var(--ct-gold); }
html[data-theme="dark"] .map-attr-text { background: rgba(30, 39, 52, 0.92); color: var(--ct-text); }
html[data-theme="dark"] .map-layers-menu { border: 1px solid var(--ct-border); background: var(--ct-card); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55); }
html[data-theme="dark"] .map-layers-menu button { color: var(--ct-text); }
html[data-theme="dark"] .map-layers-menu button:hover,
html[data-theme="dark"] .map-layers-menu button.map-overlay:hover { background: var(--ct-elevated); }
html[data-theme="dark"] .map-layers-menu button[aria-checked="true"]:not(.map-overlay) { background: var(--ct-elevated); box-shadow: inset 3px 0 0 var(--ct-gold); }
html[data-theme="dark"] .map-layers-head { border-top-color: var(--ct-border); color: var(--ct-muted); }
html[data-theme="dark"] .map-overlay-check { border-color: var(--ct-muted); }
html[data-theme="dark"] .map-overlay[aria-checked="true"] .map-overlay-check { border-color: var(--ct-gold); background: var(--ct-gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1400' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 10px no-repeat; }
html[data-theme="dark"] .sight-popup-wrap .leaflet-popup-content-wrapper,
html[data-theme="dark"] .sight-popup-wrap .leaflet-popup-tip { background: var(--ct-card); color: var(--ct-text); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55); }
html[data-theme="dark"] .sight-popup-wrap .leaflet-popup-content-wrapper { border: 1px solid var(--ct-border); }
html[data-theme="dark"] .sight-popup-wrap a.leaflet-popup-close-button { color: var(--ct-muted); }
html[data-theme="dark"] .sight-popup-wrap a.leaflet-popup-close-button:hover { color: var(--ct-text); }
html[data-theme="dark"] .sight-popup-title { border-bottom-color: var(--ct-border); }
html[data-theme="dark"] .sight-popup-addr,
html[data-theme="dark"] .sight-popup .sight-lines-label,
html[data-theme="dark"] .sight-popup .sight-stop-label,
html[data-theme="dark"] .sight-popup .sight-stop-dist { color: var(--ct-muted); }
html[data-theme="dark"] .sight-popup-stop strong { color: var(--ct-text); }
html[data-theme="dark"] .sight-popup-photo { background: var(--ct-elevated); }
/* the website button takes the theme's secondary button look (css/theme.css dark-mode control contrast) */
html[data-theme="dark"] .sight-popup-actions .sight-popup-route:hover { background: var(--ct-gold-hover); border-color: var(--ct-gold-hover); }
