/* Lepiaci panel: vyhľadávanie a register písmen */

/* ---------- Lepiaci panel: vyhľadávanie + register ---------- */
.bar {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  padding-block: 10px 8px;
  padding-top: max(10px, env(safe-area-inset-top));
  transition: border-color .2s, box-shadow .2s;
}
.bar.stuck { border-bottom-color: var(--line); box-shadow: 0 6px 16px -12px rgba(0, 0, 0, .25); }
.tools { display: flex; gap: 10px; align-items: center; }
.search { position: relative; flex: 1; min-width: 0; }
.search [data-icon="search"] svg { position: absolute; left: 15px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 50px;
  padding: 0 46px 0 46px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1rem; /* 16 px – iOS pri zameraní nezväčšuje stránku */
  box-shadow: var(--shadow);
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--muted); opacity: .85; }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.search .icon-btn { position: absolute; right: 6px; top: 50%; width: 38px; height: 38px; transform: translateY(-50%); border-radius: 10px; }
.search .icon-btn svg { width: 18px; height: 18px; }
.prog-btn {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 9px;
  height: 50px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow);
  font-weight: 650; font-size: .95rem; cursor: pointer;
}
.prog-btn svg { width: 20px; height: 20px; color: var(--accent); }
.prog-btn:hover { background: var(--accent-soft); }
.badge {
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: var(--surface);
  font-size: .78rem; font-weight: 700; line-height: 22px; text-align: center;
}
@media (max-width: 480px) {
  .prog-label { display: none; }
  .prog-btn { padding: 0 13px; gap: 6px; }
}

/* Register písmen: na mobiloch a tabletoch pás, na veľkých obrazovkách zvislý pruh vpravo */
.letters {
  position: relative;
  display: flex; gap: 4px; margin-top: 8px; padding-bottom: 2px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.letters::-webkit-scrollbar { display: none; }
.letters a {
  flex: 1 0 auto; min-width: 38px; height: 38px; padding-inline: 8px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--muted); text-decoration: none;
  font-size: .9rem; font-weight: 650;
}
.letters a:hover { background: var(--accent-soft); color: var(--accent); }
.letters a.current { background: var(--accent); color: var(--surface); }
.letters a.off { opacity: .28; pointer-events: none; }
@media (min-width: 1100px) {
  .letters {
    position: fixed; right: 14px; top: 50%; z-index: 25;
    transform: translateY(-50%);
    flex-direction: column; gap: 0; margin: 0; padding: 6px;
    overflow: visible;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  }
  .letters a { flex: none; min-width: 34px; height: clamp(16px, calc((100vh - 96px) / 30), 24px); padding: 0 4px; border-radius: 7px; font-size: .74rem; }
}
