.kto-map { position: relative; width: 100%; font-family: inherit; color: #1a1a1a; }
.kto-map .kto-map-canvas { width: 100%; height: var(--kto-map-h, 520px); border-radius: 14px; overflow: hidden; border: 1px solid #d9d9d9; z-index: 0; }
.kto-map .kto-map-gate { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 220px; padding: 24px; border: 1px dashed #bdbdbd; border-radius: 14px; background: #f6f6f6; text-align: center; }
.kto-map .kto-map-gate p { margin: 0; max-width: 460px; color: #555; }
.kto-map .kto-map-empty { margin: 10px 0 0; color: #555; }

.kto-map .kto-map-btn { display: inline-block; background: var(--kto-accent, #1f7a5c); color: #fff !important; border: 0; border-radius: 8px; padding: 10px 18px; font-weight: 700; text-decoration: none; cursor: pointer; font-size: 15px; line-height: 1.2; }
.kto-map .kto-map-btn:hover, .kto-map .kto-map-btn:focus { filter: brightness(1.08); }

/* Pin: a rotated rounded square, the point at the bottom. */
.kto-pin-wrap { background: none; border: 0; }
.kto-pin { display: block; width: 28px; height: 28px; margin: 2px 1px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); border: 2px solid #fff; box-sizing: border-box; position: relative; }
.kto-pin::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #fff; top: 50%; left: 50%; margin: -4px 0 0 -4px; }

/* Pin colours by state: free / last places / no date. */
.kto-pin.kto-pin-free { background: #2e9d4f; }
.kto-pin.kto-pin-low { background: #f08c00; }
.kto-pin.kto-pin-none { background: #8a8a8a; }
.kto-map .kto-map-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; padding: 0; font-size: 14px; color: #444; }
.kto-map .kto-map-legend li { margin: 0; display: flex; align-items: center; gap: 6px; }
.kto-map .kto-map-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.kto-map .kto-map-dot.kto-pin-free { background: #2e9d4f; }
.kto-map .kto-map-dot.kto-pin-low { background: #f08c00; }
.kto-map .kto-map-dot.kto-pin-none { background: #8a8a8a; }

/* "Tours near me" */
.kto-map .kto-map-nearbtn { background: #fff; color: #1a1a1a; border: 2px solid rgba(0, 0, 0, .25); border-radius: 6px; padding: 6px 12px; font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1.2; }
.kto-map .kto-map-nearbtn:hover { background: #f3f3f3; }
.kto-map .kto-map-nearbtn:disabled { opacity: .6; cursor: wait; }
.kto-me-wrap { background: none; border: 0; }
.kto-me { display: block; width: 18px; height: 18px; margin: 1px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(26, 115, 232, .25); box-sizing: border-box; }
.kto-map .kto-map-near-msg { margin: 0 0 10px; font-size: 14px; color: #555; }
.kto-map .kto-map-near-msg:empty { display: none; }
.kto-map .kto-map-near { margin: 0 0 10px; border: 1px solid #d9d9d9; border-radius: 12px; padding: 12px 14px; background: #fff; }
.kto-map .kto-map-near[hidden] { display: none; }
.kto-map .kto-map-near-head { display: flex; align-items: baseline; gap: 4px; margin-bottom: 6px; }
.kto-map .kto-map-near-note { color: #666; font-size: 13px; }
.kto-map .kto-map-near-close { margin-left: auto; background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: #444; padding: 0 4px; }
.kto-map .kto-map-near-list { list-style: none; margin: 0; padding: 0; }
.kto-map .kto-map-near-list li { margin: 0; border-top: 1px solid #eee; }
.kto-map .kto-map-near-item { display: grid; grid-template-columns: 14px 1fr auto; column-gap: 10px; row-gap: 2px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 9px 2px; cursor: pointer; font: inherit; color: inherit; }
.kto-map .kto-map-near-item:hover .kto-map-near-name, .kto-map .kto-map-near-item:focus .kto-map-near-name { text-decoration: underline; }
.kto-map .kto-map-near-name { font-weight: 700; }
.kto-map .kto-map-near-dist { font-weight: 600; white-space: nowrap; }
.kto-map .kto-map-near-sub { grid-column: 2 / 4; font-size: 13px; color: #666; }

/* Popup */
.kto-map .leaflet-popup-content-wrapper { border-radius: 12px; padding: 0; overflow: hidden; }
.kto-map .leaflet-popup-content { margin: 0; width: auto !important; }
.kto-map .kto-map-pop { min-width: 240px; }
.kto-map .kto-map-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #eee; }
.kto-map .kto-map-body { padding: 12px 14px 14px; }
.kto-map .kto-map-title { font-weight: 700; font-size: 16px; line-height: 1.25; margin-bottom: 4px; }
.kto-map .kto-map-price { font-weight: 700; color: var(--kto-accent, #1f7a5c); margin-bottom: 8px; }
.kto-map .kto-map-row { font-size: 13.5px; line-height: 1.4; margin-bottom: 3px; }
.kto-map .kto-map-k { color: #666; }
.kto-map .kto-map-body .kto-map-btn { margin-top: 10px; }

/* Mapy.com logo and copyright above the map (their attribution rule). */
.kto-map .kto-map-mapylogo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.kto-map .kto-map-mapylogo[hidden] { display: none; }
.kto-map .kto-map-copy { font-size: 12px; color: #555; }

/* Close button: a clear round white button on the photo (the selector must outrank Leaflet's own a.leaflet-popup-close-button). */
.kto-map .kto-map-canvas a.leaflet-popup-close-button { top: 8px; right: 8px; width: 24px; height: 24px; padding: 0; border-radius: 50%; background: #fff; color: #1a1a1a; font: 700 19px/22px Arial, sans-serif; text-align: center; box-shadow: 0 1px 8px rgba(0, 0, 0, .45); z-index: 5; transition: background .15s, color .15s, transform .15s; }
.kto-map .kto-map-canvas a.leaflet-popup-close-button:hover, .kto-map .kto-map-canvas a.leaflet-popup-close-button:focus { background: var(--kto-accent, #1f7a5c); color: #fff; transform: scale(1.08); }
