/* Chybovník (public/assets/chybovnik.js): nabídka na pravém tlačítku, formulář a zvýraznění místa.
   Běží na webu i uvnitř přehledů polí, proto má vlastní barvy, písmo a předponu chv- a nespoléhá na styly stránky. */
[data-chv] { box-sizing: border-box; font: 400 15px/1.4 "Inter", "Opatrne pole Inter", system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; color: #0d1215; text-align: left; }
[data-chv] * { box-sizing: border-box; }
[data-chv][hidden] { display: none !important; }
@media print { [data-chv] { display: none !important; } }

.chv-menu { position: fixed; z-index: 2147483000; min-width: 260px; padding: 5px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #dde2da, 0 14px 36px rgba(13, 18, 21, .26); }
.chv-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.chv-menu button:hover, .chv-menu button:focus-visible { background: #f3f4ee; outline: none; }
.chv-menu svg { flex: none; width: 20px; height: 20px; fill: none; stroke: #e98b0c; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chv-menu p { margin: 4px 0 0; padding: 7px 12px 5px; border-top: 1px solid #dde2da; font-size: 12px; color: #56625d; }
@media (hover: none) { .chv-menu p { display: none; } }

.chv-ramecek { position: fixed; z-index: 2147482900; pointer-events: none; border: 2px solid #e98b0c; border-radius: 6px; background: rgba(233, 139, 12, .09); }
.chv-spendlik { position: fixed; z-index: 2147482910; pointer-events: none; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid #fff; border-radius: 50%; background: #e98b0c; box-shadow: 0 0 0 2px #6f3d00; animation: chv-puls 1.4s ease-out infinite; }
@keyframes chv-puls {
  0% { box-shadow: 0 0 0 2px #6f3d00, 0 0 0 0 rgba(233, 139, 12, .6); }
  100% { box-shadow: 0 0 0 2px #6f3d00, 0 0 0 16px rgba(233, 139, 12, 0); }
}

.chv-vybirani, .chv-vybirani * { cursor: crosshair !important; }
.chv-lista { position: fixed; z-index: 2147483100; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px); padding: 8px 8px 8px 18px; border-radius: 64px; background: #0d1215; color: #fff; box-shadow: 0 10px 30px rgba(13, 18, 21, .35); }
.chv-lista button, .chv-lista button * { cursor: pointer !important; }
.chv-lista button { flex: none; min-height: 36px; padding: 6px 14px; border: 0; border-radius: 64px; background: #f6f0e6; color: #0e1f1a; font: inherit; font-weight: 500; }

.chv-panel, .chv-bublina { position: fixed; z-index: 2147483200; left: 16px; top: 16px; width: min(360px, calc(100vw - 32px)); padding: 16px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px #dde2da, 0 18px 44px rgba(13, 18, 21, .28); }
.chv-bublina { z-index: 2147483000; width: min(320px, calc(100vw - 32px)); border-left: 5px solid #e98b0c; }
.chv-bublina p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chv-hlava { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chv-hlava strong { font-size: 17px; font-weight: 500; }
.chv-hlava button { width: 36px; height: 36px; margin: -8px -8px -8px 0; border: 0; border-radius: 50%; background: none; color: #56625d; font-size: 16px; line-height: 1; cursor: pointer; }
.chv-hlava button:hover { background: #f3f4ee; }
.chv-misto { margin: 6px 0 10px; font-size: 13px; color: #56625d; }
.chv-citace { margin: 0 0 10px; padding: 6px 10px; border-left: 3px solid #dde2da; background: #f3f4ee; font-size: 13px; }
.chv-panel textarea, .chv-panel input[type="text"] { display: block; width: 100%; margin: 0 0 8px; padding: 10px 12px; border: 1px solid #c9d0c6; border-radius: 10px; background: #fff; color: #0d1215; font: inherit; font-size: 16px; outline: none; resize: vertical; }
.chv-panel textarea:focus, .chv-panel input:focus { border-color: #12735a; box-shadow: 0 0 0 3px rgba(18, 115, 90, .18); }
.chv-odeslat { width: 100%; min-height: 46px; padding: 10px; border: 0; border-radius: 64px; background: #12735a; color: #fff; font: inherit; font-weight: 500; cursor: pointer; }
.chv-odeslat:hover { background: #0d1215; }
.chv-odeslat:disabled { opacity: .6; cursor: default; }
.chv-vystup { margin: 10px 0 0; font-size: 14px; color: #a23b07; }
.chv-vystup[data-ok="1"] { color: #0f5134; }
.chv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* tlačítko v liště přehledu polí a odkaz v patičce webu */
.op-lista .op-lista-chyba { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 44px; min-height: 44px; margin-left: auto; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 64px; background: none; color: #fff; font: inherit; white-space: nowrap; cursor: pointer; }
.op-lista .op-lista-chyba:hover { background: #1c2125; }
.op-lista .op-lista-chyba:focus-visible { outline: 2px solid #f2b632; outline-offset: 2px; }
.op-lista .op-lista-chyba svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.op-lista .op-lista-chyba + .op-lista-volat { margin-left: 0; }
.f-copy .chv-odkaz { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.f-copy .chv-odkaz:hover { color: #f2b632; }

/* Na telefonu panel vyjede zespodu přes celou šířku, kurzor tu není. */
@media (max-width: 600px) {
  .chv-panel, .chv-bublina { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; border-radius: 16px 16px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .chv-bublina { border-top: 5px solid #e98b0c; border-left: 0; }
}
@media (max-width: 640px) {
  .op-lista .op-lista-chyba span { display: none; }
  .op-lista .op-lista-chyba { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { .chv-spendlik { animation: none; } }
