/**
 * dedictvi-mapa.css
 * Mapový modul se skupinami míst
 */

.nkd-mapa-wrap { margin-top: 0.25rem; }

/* Step label (1. krok, 2. krok) */
.nkd-mapa-step-label { display: flex; align-items: center; gap: 0.55rem; font-size: 0.88rem; font-weight: 500; color: var(--ink); margin: 0.7rem 0 0.5rem; }
.nkd-mapa-step-label:first-child { margin-top: 0; }
.nkd-mapa-step-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: var(--white); font-size: 0.78rem; font-weight: 600; flex-shrink: 0; }

/* Scan banner (kontextová výzva k převedení textu) */
.nkd-mapa-scan-banner { display: none; align-items: center; gap: 0.9rem; padding: 0.75rem 1rem; background: var(--red-light); border-left: 3px solid var(--red); border-radius: 0 8px 8px 0; margin-bottom: 0.85rem; }
.nkd-mapa-scan-banner-text { flex: 1; font-size: 0.85rem; line-height: 1.45; color: #5a3828; }
.nkd-mapa-scan-banner-text strong { display: inline; font-weight: 600; color: #8a3d28; }
.nkd-mapa-scan-banner-sub { color: #5a3828; }
.nkd-mapa-scan-banner-btn { padding: 0.45rem 0.95rem; background: var(--red); color: var(--white); border: none; border-radius: var(--radius-pill); font-family: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; flex-shrink: 0; transition: background 0.15s; }
.nkd-mapa-scan-banner-btn:hover { background: var(--red-hover); }
.nkd-mapa-scan-banner-close { background: none; border: none; font-size: 1.3rem; line-height: 1; color: #8a3d28; cursor: pointer; padding: 0 0.3rem; opacity: 0.6; transition: opacity 0.15s; flex-shrink: 0; }
.nkd-mapa-scan-banner-close:hover { opacity: 1; }

/* Skupiny */
.nkd-mapa-groups { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.nkd-mapa-group { display: inline-flex; align-items: center; gap: 6px; padding: 0.4rem 0.85rem; font-family: inherit; font-size: 0.82rem; font-weight: 500; color: var(--ink-soft); background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-pill); cursor: pointer; transition: all 0.15s; }
.nkd-mapa-group:hover { border-color: var(--ink-soft); }
.nkd-mapa-group-ico, .nkd-mapa-druh-badge { flex-shrink: 0; display: inline-block; vertical-align: middle; }

/* Mapa kontejner */
.nkd-mapa-container { width: 100%; height: 420px; border-radius: var(--radius); border: 1.5px solid var(--border); overflow: hidden; position: relative; }
.nkd-mapa-container .leaflet-popup-content-wrapper { border-radius: var(--radius) !important; box-shadow: var(--shadow-md) !important; font-family: 'Inter', system-ui, sans-serif !important; }
.nkd-mapa-container .leaflet-popup-content { margin: 12px 14px !important; font-size: 0.82rem !important; line-height: 1.5 !important; }
.nkd-mapa-container .leaflet-popup-content b { font-weight: 600; font-size: 0.88rem; }

/* Search overlay (uvnitř mapy, vlevo nahoře) */
.nkd-mapa-search-overlay { position: absolute; top: 12px; left: 60px; right: 12px; max-width: 320px; z-index: 500; }
.nkd-mapa-search-inner { position: relative; background: var(--white); border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.nkd-mapa-search-inner svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.nkd-form .nkd-mapa-search-inner input[type="text"] { width: 100%; padding: 0.45rem 0.75rem 0.45rem 2.2rem !important; font-family: inherit; font-size: 0.85rem !important; border: 1px solid var(--border); border-radius: 8px !important; background: transparent; color: var(--ink); outline: none; box-sizing: border-box; }
.nkd-form .nkd-mapa-search-inner input[type="text"]:focus { border-color: var(--red); box-shadow: 0 0 0 2px var(--focus-ring); }
.nkd-mapa-search-overlay .nkd-mapa-search-results { display: none; margin-top: 4px; background: var(--white); border: 1px solid var(--border); border-radius: 8px; max-height: 220px; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.nkd-mapa-search-overlay .nkd-mapa-search-item { padding: 0.55rem 0.8rem; font-size: 0.82rem; cursor: pointer; border-bottom: 1px solid var(--border-light); color: var(--ink); }
.nkd-mapa-search-overlay .nkd-mapa-search-item:last-child { border-bottom: none; }
.nkd-mapa-search-overlay .nkd-mapa-search-item:hover { background: var(--bg); }
.nkd-mapa-search-overlay .nkd-mapa-search-item small { color: var(--muted); display: block; font-size: 0.72rem; margin-top: 2px; }

/* Plovoucí nástroje (vpravo dole v mapě) */
.nkd-mapa-floating-tools { position: absolute; bottom: 32px; right: 12px; z-index: 500; display: flex; flex-direction: column; gap: 2px; background: var(--white); border-radius: 10px; padding: 4px; box-shadow: 0 3px 10px rgba(0,0,0,0.18); }
.nkd-mapa-ftool { display: flex; align-items: center; gap: 8px; padding: 7px 11px; font-family: inherit; font-size: 0.8rem; font-weight: 500; color: var(--ink-soft); background: transparent; border: none; border-radius: 6px; cursor: pointer; transition: background 0.12s, color 0.12s; text-align: left; white-space: nowrap; }
.nkd-mapa-ftool svg { flex-shrink: 0; color: currentColor; }
.nkd-mapa-ftool:hover { background: var(--bg); color: var(--ink); }
.nkd-mapa-ftool.active { background: var(--red-light); color: var(--red); font-weight: 600; }

/* Centrální hint (uprostřed mapy, dokud není nic přidáno) */
.nkd-mapa-center-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 400; pointer-events: none !important; }
.nkd-mapa-center-hint * { pointer-events: none !important; }
.nkd-mapa-center-hint-box { background: rgba(255,255,255,0.92); border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; font-size: 0.78rem; color: var(--ink-soft); box-shadow: 0 2px 8px rgba(0,0,0,0.12); text-align: center; white-space: nowrap; }

/* Prompt */
.nkd-mapa-prompt { display: none; margin-top: 0.6rem; padding: 0.85rem 1rem; background: var(--white); border: 1.5px solid var(--red); border-radius: var(--radius); }
.nkd-mapa-prompt.visible { display: block; }
.nkd-mapa-prompt-notice { display: flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 500; color: var(--red); background: var(--red-light); padding: 0.4rem 0.65rem; border-radius: 6px; margin-bottom: 0.55rem; line-height: 1.35; }
.nkd-mapa-prompt-notice svg { flex-shrink: 0; color: var(--red); }
.nkd-mapa-prompt-title { font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-bottom: 0.15rem; }
.nkd-mapa-prompt-coords { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.5rem; }
.nkd-mapa-prompt input[type="text"] { width: 100%; padding: 0.45rem 0.75rem; font-family: inherit; font-size: 0.88rem; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--white); color: var(--ink); outline: none; box-sizing: border-box; }
.nkd-mapa-prompt input[type="text"]:focus { border-color: var(--red); box-shadow: var(--ded-focus); }
.nkd-mapa-prompt-actions { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.nkd-mapa-prompt .btn-save { flex: 1; padding: 0.5rem 0; font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--white); background: var(--red); border: none; border-radius: var(--radius); cursor: pointer; transition: background 0.15s; }
.nkd-mapa-prompt .btn-save:hover { background: var(--red-hover); }
.nkd-mapa-prompt .btn-cancel { padding: 0.5rem 0.85rem; font-family: inherit; font-size: 0.85rem; font-weight: 500; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }

/* Měsíce (jen pro Akce a festivaly) */
.nkd-mapa-months { margin-top: 0.5rem; }
.nkd-mapa-months-label { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.3rem; }
.nkd-mapa-months-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.3rem 0.5rem; }
.nkd-mapa-months-grid label { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--ink-soft); cursor: pointer; padding: 0.25rem 0.35rem; border-radius: 5px; transition: background 0.1s; white-space: nowrap; }
.nkd-mapa-months-grid label:hover { background: var(--bg); }
.nkd-mapa-months-grid input[type="checkbox"] { accent-color: var(--red); margin: 0; width: 15px; height: 15px; }
.nkd-mapa-termin-note { margin-top: 0.4rem; }
.nkd-mapa-termin-note input { font-size: 0.82rem !important; }

/* Seznam seskupený */
.nkd-mapa-list { margin-top: 0.6rem; }
.nkd-mapa-list-group { margin-bottom: 0.5rem; }
.nkd-mapa-list-group-header { display: flex; align-items: center; gap: 6px; justify-content: space-between; padding: 0.35rem 0.5rem; border-left: 3px solid var(--border); border-radius: 0; font-size: 0.75rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.nkd-mapa-list-group-header .list-group-name { flex: 1; }
.list-group-count { font-size: 0.7rem; color: var(--muted); background: var(--bg); padding: 0.1rem 0.4rem; border-radius: var(--radius-pill); }
.nkd-mapa-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border-light); transition: background 0.15s; cursor: pointer; }
.nkd-mapa-item[data-idx]:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.nkd-mapa-item:last-child { border-bottom: none; }
.nkd-mapa-item:hover { background: var(--bg); border-radius: var(--radius); }
.nkd-mapa-item-dot { display: inline-flex; flex-shrink: 0; line-height: 0; }
.nkd-mapa-icon-wrap { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.18)); transition: transform 0.15s ease; }
.nkd-mapa-icon-wrap:hover { transform: scale(1.15); filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25)); z-index: 1000 !important; }
.nkd-mapa-item-body { flex: 1; min-width: 0; }
.nkd-mapa-item-name { font-size: 0.82rem; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nkd-mapa-item-meta { font-size: 0.7rem; color: var(--muted); }
.nkd-mapa-item-actions { display: flex; gap: 0.3rem; flex-shrink: 0; }
.nkd-mapa-item-btn { padding: 0.2rem 0.5rem; font-family: inherit; font-size: 0.72rem; font-weight: 500; color: var(--ink-soft); background: none; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all 0.15s; }
.nkd-mapa-item-btn:hover { border-color: var(--red); color: var(--red); }
.nkd-mapa-item-btn.btn-del:hover { background: var(--red-light); }

/* Status */
.nkd-mapa-status { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; font-size: 0.75rem; color: var(--muted); }
.nkd-mapa-count { font-weight: 600; color: var(--ink-soft); }

/* Suggest dropdown */
.nkd-mapa-suggest-dropdown { display: none; position: absolute; left: 0; right: 0; z-index: 1000; background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); margin-top: 2px; max-height: 240px; overflow-y: auto; box-shadow: var(--shadow-md); }
.nkd-mapa-suggest-item { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.55rem 0.75rem; cursor: pointer; border-bottom: 1px solid var(--border-light); transition: background 0.1s; outline: none; }
.nkd-mapa-suggest-item:last-child { border-bottom: none; }
.nkd-mapa-suggest-item:hover, .nkd-mapa-suggest-item:focus { background: var(--bg); }
.nkd-mapa-suggest-item.already { opacity: 0.6; }
.nkd-mapa-suggest-item .suggest-main { display: flex; align-items: center; gap: 0.4rem; flex: 1; min-width: 0; }
.nkd-mapa-suggest-item .suggest-name { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.nkd-mapa-suggest-item .suggest-type { font-size: 0.68rem; color: var(--muted); background: var(--bg); padding: 0.1rem 0.4rem; border-radius: var(--radius-pill); }
.nkd-mapa-suggest-item .suggest-badge { font-size: 0.68rem; font-weight: 600; color: var(--muted); }
.nkd-mapa-suggest-item .suggest-badge.suggest-add { color: var(--red); }

@media (max-width: 600px) {
  .nkd-mapa-container { height: 340px; }
  .nkd-mapa-search-overlay { left: 52px; right: 8px; max-width: none; }
  .nkd-mapa-groups { gap: 0.25rem; }
  .nkd-mapa-group { font-size: 0.75rem; padding: 0.3rem 0.65rem; }
  .nkd-mapa-months-grid { grid-template-columns: repeat(3, 1fr); }
  .nkd-mapa-floating-tools { bottom: 28px; right: 8px; padding: 3px; }
  .nkd-mapa-ftool { padding: 6px 8px; font-size: 0.72rem; gap: 6px; }
  .nkd-mapa-scan-banner { flex-wrap: wrap; }
  .nkd-mapa-scan-banner-btn { width: 100%; margin-top: 6px; }
}

/* Preview marker (náhled před potvrzením) */
.nkd-preview-pulse { animation: nkd-pulse 1.5s ease-in-out infinite; }
@keyframes nkd-pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 0.15; } }

/* ═══ SCAN MODAL: hromadné hledání míst v textu ═══ */
.nkd-mapa-scan-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.nkd-mapa-scan-modal.visible { opacity: 1; pointer-events: auto; }
.nkd-mapa-scan-backdrop { position: absolute; inset: 0; background: rgba(44, 44, 44, 0.55); }
.nkd-mapa-scan-dialog { position: relative; background: var(--white, #fff); border-radius: 14px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.25); font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; color: var(--ded-fe-ink); }
.nkd-mapa-scan-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 1.1rem 1.25rem 0.9rem; border-bottom: 1px solid var(--ded-fe-border-light); gap: 1rem; }
.nkd-mapa-scan-title { font-size: 1rem; font-weight: 600; color: var(--ded-fe-ink); margin-bottom: 2px; }
.nkd-mapa-scan-sub { font-size: 0.8rem; color: var(--ded-fe-muted); line-height: 1.45; }
.nkd-mapa-scan-close { background: none; border: none; font-size: 1.6rem; line-height: 1; color: var(--ded-fe-muted); cursor: pointer; padding: 0 0.3rem; flex-shrink: 0; }
.nkd-mapa-scan-close:hover { color: var(--ded-fe-ink); }
.nkd-mapa-scan-bulk { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.25rem; background: var(--ded-fe-bg); border-bottom: 1px solid var(--ded-fe-border-light); font-size: 0.82rem; }
.nkd-mapa-scan-bulk label { font-weight: 500; color: var(--ded-fe-ink-soft); }
.nkd-mapa-scan-bulk select { padding: 0.3rem 0.6rem; font-size: 0.82rem; font-family: inherit; border: 1px solid var(--ded-fe-border); border-radius: 6px; background: #fff; color: var(--ded-fe-ink); cursor: pointer; }
.nkd-mapa-scan-list { flex: 1; overflow-y: auto; padding: 0.3rem 0; }
.nkd-scan-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 1.25rem; border-bottom: 1px solid #f0ede7; transition: background 0.12s; }
.nkd-scan-item:last-child { border-bottom: none; }
.nkd-scan-item:hover { background: #faf9f5; }
.nkd-scan-item.not-found { opacity: 0.55; }
.nkd-scan-item.already { background: #f0ede7; }
.nkd-scan-check { flex-shrink: 0; }
.nkd-scan-check input { width: 18px; height: 18px; accent-color: var(--ded-fe-red); cursor: pointer; }
.nkd-scan-name { flex: 1; min-width: 0; font-size: 0.88rem; color: var(--ded-fe-ink); }
.nkd-scan-name strong { font-weight: 600; }
.nkd-scan-meta { font-size: 0.72rem; color: var(--ded-fe-muted); margin-top: 2px; line-height: 1.35; }
.nkd-scan-group-wrap { flex-shrink: 0; }
.nkd-scan-group { padding: 0.25rem 0.5rem; font-size: 0.78rem; font-family: inherit; border: 1px solid var(--ded-fe-border); border-radius: 5px; background: #fff; color: var(--ded-fe-ink); cursor: pointer; max-width: 130px; }
.nkd-scan-group:disabled { background: #f0ede7; color: var(--ded-fe-muted); cursor: not-allowed; }
.nkd-scan-status { font-size: 0.72rem; color: var(--ded-fe-muted); font-style: italic; flex-shrink: 0; }
.nkd-scan-item.already .nkd-scan-status { color: #639922; font-style: normal; font-weight: 500; }
.nkd-scan-item.not-found .nkd-scan-status { color: var(--ded-fe-red); }
.nkd-mapa-scan-foot { display: flex; gap: 0.5rem; padding: 0.85rem 1.25rem; border-top: 1px solid var(--ded-fe-border-light); justify-content: flex-end; background: #fafaf7; border-radius: 0 0 14px 14px; }
.nkd-mapa-scan-foot button { padding: 0.55rem 1.1rem; font-family: inherit; font-size: 0.85rem; font-weight: 600; border-radius: 8px; cursor: pointer; border: none; transition: all 0.15s; }
.nkd-mapa-scan-foot .btn-cancel { background: #fff; border: 1px solid var(--ded-fe-border); color: var(--ded-fe-ink-soft); }
.nkd-mapa-scan-foot .btn-cancel:hover { background: var(--ded-fe-bg); }
.nkd-mapa-scan-foot .btn-save { background: var(--ded-fe-red); color: #fff; }
.nkd-mapa-scan-foot .btn-save:hover:not(:disabled) { background: var(--ded-fe-red-hover); }
.nkd-mapa-scan-foot .btn-save:disabled { background: #d4c4bd; cursor: not-allowed; }

/* ═══ EDIT MODAL (úprava existujícího místa) ═══ */
.nkd-mapa-edit-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.nkd-mapa-edit-modal.visible { opacity: 1; pointer-events: auto; }
.nkd-mapa-edit-backdrop { position: absolute; inset: 0; background: rgba(44, 44, 44, 0.55); }
.nkd-mapa-edit-dialog { position: relative; background: #fff; border-radius: 14px; width: min(500px, calc(100vw - 32px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.25); font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; color: var(--ded-fe-ink); overflow: hidden; }
.nkd-mapa-edit-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--ded-fe-border-light); }
.nkd-mapa-edit-title { font-size: 1rem; font-weight: 600; color: var(--ded-fe-ink); }
.nkd-mapa-edit-close { background: none; border: none; font-size: 1.6rem; line-height: 1; color: var(--ded-fe-muted); cursor: pointer; padding: 0 0.3rem; }
.nkd-mapa-edit-close:hover { color: var(--ded-fe-ink); }
.nkd-mapa-edit-body { padding: 1rem 1.25rem; overflow-y: auto; flex: 1; }
.nkd-mapa-edit-label { display: block; font-size: 0.78rem; font-weight: 500; color: var(--ded-fe-muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 0.8rem 0 0.35rem; }
.nkd-mapa-edit-label:first-child { margin-top: 0; }
.nkd-mapa-edit-input { width: 100%; padding: 0.55rem 0.7rem; font-family: inherit; font-size: 0.88rem; border: 1px solid var(--ded-fe-border); border-radius: 7px; background: #fafaf7; color: var(--ded-fe-ink); box-sizing: border-box; outline: none; }
.nkd-mapa-edit-input:focus { border-color: var(--ded-fe-red); background: #fff; }
.nkd-mapa-edit-groups { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.nkd-mapa-edit-groups .nkd-mapa-group { font-size: 0.78rem; padding: 0.35rem 0.7rem; border: 1.5px solid var(--ded-fe-border); border-radius: 999px; background: #fff; color: var(--ded-fe-ink-soft); cursor: pointer; font-family: inherit; transition: all 0.15s; }
.nkd-mapa-edit-groups .nkd-mapa-group:hover { border-color: var(--ded-fe-muted); }
.nkd-mapa-edit-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.3rem 0.5rem; font-size: 0.82rem; }
.nkd-mapa-edit-months label { display: flex; align-items: center; gap: 0.35rem; cursor: pointer; color: var(--ded-fe-ink-soft); }
.nkd-mapa-edit-months input { accent-color: var(--ded-fe-red); margin: 0; }
.nkd-mapa-edit-coords { margin-top: 0.9rem; font-size: 0.75rem; color: var(--ded-fe-muted); font-family: "SF Mono", Menlo, monospace; background: #faf9f5; padding: 0.5rem 0.7rem; border-radius: 6px; }
.nkd-mapa-edit-foot { display: flex; gap: 0.5rem; padding: 0.85rem 1.25rem; border-top: 1px solid var(--ded-fe-border-light); justify-content: flex-end; background: #fafaf7; }
.nkd-mapa-edit-foot button { padding: 0.55rem 1.1rem; font-family: inherit; font-size: 0.85rem; font-weight: 600; border-radius: 8px; cursor: pointer; border: none; transition: all 0.15s; }
.nkd-mapa-edit-foot .btn-cancel { background: #fff; border: 1px solid var(--ded-fe-border); color: var(--ded-fe-ink-soft); }
.nkd-mapa-edit-foot .btn-cancel:hover { background: var(--ded-fe-bg); }
.nkd-mapa-edit-foot .btn-save { background: var(--ded-fe-red); color: #fff; }
.nkd-mapa-edit-foot .btn-save:hover { background: var(--ded-fe-red-hover); }

@media (max-width: 600px) {
  .nkd-mapa-edit-months { grid-template-columns: repeat(3, 1fr); }
}

/* ═══ INTERAKTIVNÍ KRESLENÍ TVARŮ ═══ */

/* Vrchol (tahací bod) */
.nkd-mapa-vertex { cursor: grab; transition: r 0.12s, stroke-width 0.12s; }
.leaflet-interactive.nkd-mapa-vertex { cursor: grab !important; }
.leaflet-interactive.nkd-mapa-vertex:active { cursor: grabbing !important; }

/* Midpoint (pull-to-create) */
.nkd-mapa-midpoint { cursor: grab; opacity: 0.55; transition: opacity 0.15s, r 0.15s; }
.nkd-mapa-midpoint:hover { opacity: 1; }
.leaflet-interactive.nkd-mapa-midpoint { cursor: grab !important; }
.leaflet-interactive.nkd-mapa-midpoint:active { cursor: grabbing !important; }

/* Permanentní křížek vpravo nahoře u každého vrcholu */
.nkd-mapa-vertex-cross {
  width: 18px; height: 18px;
  background: #fff;
  color: var(--ded-fe-red);
  border: 1.5px solid var(--ded-fe-red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  line-height: 1;
  font-weight: 400;
  box-shadow: 0 1px 3px rgba(0,0,0,0.22);
  transition: all 0.12s;
}
.nkd-mapa-vertex-cross:hover {
  background: var(--ded-fe-red);
  color: #fff;
  transform: scale(1.15);
}

/* Toolbar vlevo dole: Zpět | Znovu | Hotovo */
.nkd-mapa-draw-toolbar {
  position: absolute;
  left: 12px; bottom: 32px;
  z-index: 500;
  display: none;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--ded-fe-border);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}
.nkd-mapa-tb-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  background: transparent;
  color: var(--ded-fe-ink-soft);
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.nkd-mapa-tb-btn:hover:not(:disabled) { background: #faf9f5; color: var(--ded-fe-ink); }
.nkd-mapa-tb-btn:disabled { color: #c5c0b8; cursor: not-allowed; opacity: 0.55; }
.nkd-mapa-tb-btn svg { flex-shrink: 0; }
.nkd-mapa-tb-done { background: transparent; color: var(--ded-fe-muted); }
.nkd-mapa-tb-done.ready { background: #639922; color: #fff; font-weight: 600; }
.nkd-mapa-tb-done.ready:hover:not(:disabled) { background: #557f1e; color: #fff; }
.nkd-mapa-tb-done:disabled { color: #c5c0b8; }

/* ═══ DEBUG PANEL ═══ */
.nkd-mapa-dbg {
  margin-top: 8px;
  background: #1e1e1e;
  color: #e6e6e6;
  border-radius: 8px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  max-height: 240px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ded-fe-ink);
}
.nkd-mapa-dbg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--ded-fe-ink);
  background: var(--ded-fe-ink);
  border-radius: 8px 8px 0 0;
}
.nkd-mapa-dbg-head strong {
  flex: 1;
  color: #ffa657;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
}
.nkd-mapa-dbg-copy, .nkd-mapa-dbg-clear {
  padding: 3px 10px;
  background: var(--ded-fe-ink-soft);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}
.nkd-mapa-dbg-copy:hover, .nkd-mapa-dbg-clear:hover { background: var(--ded-fe-ink-soft); }
.nkd-mapa-dbg-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px;
  line-height: 1.4;
}
.nkd-mapa-dbg-line {
  white-space: pre-wrap;
  word-break: break-all;
  padding: 1px 0;
  border-bottom: 1px dashed var(--ded-fe-ink);
}
.nkd-mapa-dbg-line:last-child { border-bottom: none; color: #9eecb8; }

@media (max-width: 600px) {
  .nkd-mapa-draw-toolbar { bottom: 28px; left: 8px; padding: 3px; gap: 2px; }
  .nkd-mapa-tb-btn { padding: 6px 10px; font-size: 0.74rem; }
  .nkd-mapa-tb-btn span { display: none; }
  .nkd-mapa-tb-done span { display: inline; }
}
