/* Společné prvky archivu pátrání (lišta, vyhledávání, formulář vzkazu).
   Vychází z barev a písem blogu (Playfair Display + Inter, černobílý styl). */
.tat-subnav {
  position: relative;
  background: #f5f5f4;
  border-bottom: 1px solid #d4d4d4;
  font-family: 'Inter', sans-serif;
}
.tat-subnav-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  display: flex; overflow-x: auto; scrollbar-width: none;
}
.tat-subnav-inner::-webkit-scrollbar { display: none; }
.tat-subnav-grp { display: flex; flex: 0 0 auto; gap: 2px; padding: 0 6px; }
.tat-subnav-grp + .tat-subnav-grp { border-left: 1px solid #d4d4d4; }
.tat-subnav-patrani { background: #ecebe8; }
.tat-subnav a {
  flex: 0 0 auto;
  font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: #6b6b6b; text-decoration: none; white-space: nowrap;
  padding: 11px 9px; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.tat-subnav a:hover { color: #1a1a1a; }
.tat-subnav a.active { color: #1a1a1a; border-bottom-color: #1a1a1a; }
.tat-subnav::before, .tat-subnav::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 28px; pointer-events: none;
  opacity: 0; transition: opacity .15s;
}
.tat-subnav::before { left: 0; background: linear-gradient(to right, #f5f5f4, rgba(245,245,244,0)); }
.tat-subnav::after { right: 0; background: linear-gradient(to left, #f5f5f4, rgba(245,245,244,0)); }
.tat-subnav.more-left::before, .tat-subnav.more-right::after { opacity: 1; }
.tat-subnav-inner > :first-child { margin-left: auto; }
.tat-subnav-inner > :last-child { margin-right: auto; }
@media (max-width: 600px) { .tat-subnav-inner { padding: 0 8px; } }

/* zvýraznění nalezeného slova */
mark.tat-hit { background: #f1e6b8; color: inherit; padding: 0 1px; border-radius: 2px; }

/* našeptávač pod vyhledávacím polem */
.tat-suggest {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 300;
  width: min(380px, 92vw); max-height: 60vh; overflow-y: auto;
  background: #fff; border: 1px solid #d4d4d4; border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  font-family: 'Inter', sans-serif; display: none;
}
.tat-suggest.open { display: block; }
.tat-suggest-group { padding: 8px 0; border-bottom: 1px solid #eee; }
.tat-suggest-group:last-child { border-bottom: none; }
.tat-suggest-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #a8a8a8; padding: 2px 14px 6px;
}
.tat-suggest a {
  display: block; padding: 6px 14px; color: #2e2e2e; text-decoration: none;
  font-size: .84rem; line-height: 1.35;
}
.tat-suggest a small { display: block; color: #a8a8a8; font-size: .72rem; }
.tat-suggest a:hover, .tat-suggest a.focus { background: #f5f5f4; }

/* formulář „Víte něco?“ */
.tat-tip {
  border: 1px solid #d4d4d4; background: #fafafa; padding: 20px;
  font-family: 'Inter', sans-serif; margin-top: 32px;
}
.tat-tip h3 {
  font-family: 'Playfair Display', serif; font-size: 1.05rem; color: #1a1a1a;
  margin: 0 0 6px;
}
.tat-tip p.tat-tip-lead { font-size: .84rem; color: #6b6b6b; line-height: 1.6; margin: 0 0 14px; }
.tat-tip label { display: block; font-size: .72rem; font-weight: 600; color: #6b6b6b; margin: 10px 0 4px; letter-spacing: .03em; }
.tat-tip input, .tat-tip textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: .88rem;
  border: 1px solid #d4d4d4; border-radius: 4px; padding: 8px 10px; background: #fff; color: #2e2e2e;
}
.tat-tip textarea { min-height: 110px; resize: vertical; }
.tat-tip .tat-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tat-tip button {
  margin-top: 12px; padding: 9px 18px; border: none; border-radius: 4px;
  background: #1a1a1a; color: #fff; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
}
.tat-tip button:disabled { opacity: .5; cursor: default; }
.tat-tip .tat-tip-msg { font-size: .82rem; margin-top: 10px; color: #2e2e2e; }
.tat-tip .tat-tip-msg.err { color: #a03030; }
.tat-tip .tat-tip-note { font-size: .7rem; color: #a8a8a8; margin-top: 8px; line-height: 1.5; }

/* štítky a karty sdílené novými stránkami */
.tat-chip {
  display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 10px; border: 1px solid #d4d4d4; border-radius: 20px; color: #6b6b6b; background: #fff;
}
.tat-chip.ok   { border-color: #9cc39c; color: #2e6b2e; background: #f1f8f1; }
.tat-chip.part { border-color: #d9c27a; color: #7a6320; background: #fbf7ea; }
.tat-chip.none { border-color: #d4a0a0; color: #8a3a3a; background: #fbf1f1; }

/* ── AI asistent archivu ─────────────────────────────────────── */
#tat-ai { position: fixed; right: 20px; bottom: 20px; z-index: 900; font-family: 'Inter', sans-serif; }
.tat-ai-fab {
  display: flex; align-items: center; gap: 8px;
  background: #1a1a1a; color: #fff; border: 0; border-radius: 999px;
  padding: 12px 18px 12px 12px; font: 600 .8rem 'Inter', sans-serif; letter-spacing: .02em;
  box-shadow: 0 6px 20px rgba(0,0,0,.22); cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.tat-ai-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.26); }
.tat-ai-fab span { width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #1a1a1a; display: grid; place-items: center; font-family: 'Playfair Display', serif; font-weight: 700; }
#tat-ai.open .tat-ai-fab { display: none; }
.tat-ai-panel {
  width: 380px; max-width: calc(100vw - 24px); height: 560px; max-height: calc(100vh - 40px);
  background: #fff; border: 1px solid #d4d4d4; box-shadow: 0 16px 48px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
}
.tat-ai-panel[hidden] { display: none; }
.tat-ai-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #d4d4d4; background: #f5f5f4; }
.tat-ai-head b { display: block; font-family: 'Playfair Display', serif; font-size: 1.05rem; color: #1a1a1a; }
.tat-ai-head small { font-size: .72rem; color: #6b6b6b; }
.tat-ai-close { background: none; border: 0; font-size: 1.5rem; line-height: 1; color: #6b6b6b; cursor: pointer; padding: 0 4px; }
.tat-ai-close:hover { color: #1a1a1a; }
.tat-ai-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.tat-ai-msg { font-size: .86rem; line-height: 1.6; color: #2e2e2e; max-width: 92%; }
.tat-ai-msg p + p { margin-top: .6em; }
.tat-ai-msg.me { align-self: flex-end; background: #1a1a1a; color: #fff; padding: 8px 12px; }
.tat-ai-msg.bot { align-self: flex-start; background: #f5f5f4; padding: 10px 12px; border: 1px solid #ececea; }
.tat-ai-msg.wait p { color: #8a8a8a; font-style: italic; }
.tat-ai-msg.err { border-color: #e6c4c4; background: #fbf3f3; color: #7a2e2e; }
.tat-ai-msg a { color: #1a1a1a; font-weight: 600; text-decoration: none; }
.tat-ai-msg a:hover { text-decoration: underline; }
.tat-ai-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tat-ai-examples button { background: #fff; border: 1px solid #d4d4d4; padding: 5px 10px; font: .76rem 'Inter', sans-serif; color: #2e2e2e; cursor: pointer; text-align: left; }
.tat-ai-examples button:hover { border-color: #1a1a1a; }
.tat-ai-src { margin-top: 8px; font-size: .76rem; }
.tat-ai-src summary { cursor: pointer; color: #6b6b6b; }
.tat-ai-src ol { list-style: none; margin-top: 6px; display: grid; gap: 4px; }
.tat-ai-src a { font-weight: 500; color: #2e2e2e; }
.tat-ai-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #d4d4d4; }
.tat-ai-form textarea { flex: 1; resize: none; border: 1px solid #d4d4d4; padding: 8px 10px; font: .86rem/1.45 'Inter', sans-serif; color: #1a1a1a; outline: none; }
.tat-ai-form textarea:focus { border-color: #1a1a1a; }
.tat-ai-form button { width: 42px; border: 0; background: #1a1a1a; color: #fff; font-size: 1.1rem; cursor: pointer; }
.tat-ai-form button:disabled, .tat-ai-form textarea:disabled { opacity: .45; cursor: not-allowed; }
.tat-ai-foot { padding: 0 12px 10px; font-size: .68rem; color: #8a8a8a; }
@media (max-width: 600px) {
  #tat-ai { right: 12px; bottom: 12px; }
  #tat-ai.open { left: 0; right: 0; bottom: 0; }
  .tat-ai-panel { width: 100%; max-width: 100%; height: 85vh; max-height: 85vh; }
  .tat-ai-fab { padding: 10px 14px 10px 10px; }
}
@media print { #tat-ai { display: none; } }
