/* Cookie lišta: dizajn podľa témy (Inter, fialová #5b4fe0, tmavý text #16171d, jemné okraje #e6e6ec). */
.thc, .thc-modal { font-family: 'Inter', Helvetica, Arial, sans-serif; color: #16171d; -webkit-font-smoothing: antialiased; }
.thc *, .thc-modal * { box-sizing: border-box; }

.thc {
  position: fixed;
  z-index: 9999;
  left: 24px;
  bottom: 24px;
  width: min(440px, calc(100vw - 32px));
  padding: 22px 22px 16px;
  background: #fff;
  border: 1px solid #e6e6ec;
  border-radius: 20px;
  box-shadow: 0 24px 56px -16px rgba(22, 23, 29, 0.32), 0 2px 8px rgba(22, 23, 29, 0.06);
  font-size: 14px;
  line-height: 1.55;
  animation: thc-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.thc__demo { margin: -4px -4px 12px; padding: 6px 10px; border-radius: 10px; background: #fff4d6; color: #7a5a00; font-size: 12px; font-weight: 600; }
.thc__title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.thc__icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #eef0fd; color: #4338ca; }
.thc__text { margin: 10px 0 16px; color: #4a4b57; }
.thc__text a { color: #4338ca; text-decoration: underline; text-underline-offset: 2px; }
.thc__actions { display: flex; gap: 8px; }

/* Všetky možnosti majú rovnakú veľkosť, farbu aj váhu (stanovisko ÚRÚ 12. 11. 2025: bez nátlaku na jednu voľbu). */
.thc__btn {
  flex: 1;
  padding: 12px 8px;
  white-space: normal;
  border-radius: 100px;
  border: 1px solid transparent;
  background: #4338ca;
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s;
}
.thc__btn:hover { background: #312e81; }

.thc button:focus-visible, .thc-modal button:focus-visible, .thc-modal input:focus-visible + span { outline: 2px solid #5b4fe0; outline-offset: 2px; }

/* Okno s nastaveniami */
.thc-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(22, 23, 29, 0.55);
  backdrop-filter: blur(3px);
  animation: thc-fade 0.2s ease both;
}
.thc-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 30px 28px 24px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 80px -20px rgba(22, 23, 29, 0.5);
  font-size: 14px;
  line-height: 1.55;
}
.thc-dialog__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f0f0f4;
  color: #16171d;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.thc-dialog__close:hover { background: #e4e4ea; }
.thc-dialog__title { margin: 0 40px 6px 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.thc-dialog__intro { margin: 0 0 18px; color: #4a4b57; }
.thc-dialog__intro a { color: #4338ca; text-decoration: underline; text-underline-offset: 2px; }
.thc-cat { padding: 16px 0; border-top: 1px solid #e6e6ec; }
.thc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.thc-cat__title { font-size: 15px; font-weight: 700; cursor: pointer; }
.thc-cat__always { font-size: 12px; font-weight: 600; color: #4338ca; background: #eef0fd; padding: 3px 10px; border-radius: 100px; white-space: nowrap; }
.thc-cat__text { margin: 6px 0 0; color: #5d5e6b; font-size: 13.5px; }
.thc-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; padding-top: 20px; border-top: 1px solid #e6e6ec; }
.thc-dialog__actions { flex-wrap: nowrap; }
.thc-dialog__actions .thc__btn { min-width: 0; }

/* Prepínač */
.thc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; cursor: pointer; }
.thc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.thc-switch span { position: absolute; inset: 0; background: #cfcfd8; border-radius: 100px; transition: background 0.2s; }
.thc-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(22, 23, 29, 0.3); transition: transform 0.2s; }
.thc-switch input:checked + span { background: #5b4fe0; }
.thc-switch input:checked + span::after { transform: translateX(20px); }

body.thc-lock { overflow: hidden; }

/* Odkaz v pätičke na opätovné otvorenie nastavení */
.site-footer__cookie { background: none; border: none; padding: 0; margin: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; opacity: 0.85; }
.site-footer__cookie:hover { opacity: 1; }

@keyframes thc-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes thc-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 560px) {
  .thc { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 18px 18px 12px; border-radius: 18px; }
  .thc-dialog { padding: 26px 20px 20px; }
  .thc-dialog__actions { flex-wrap: wrap; }
  .thc-dialog__actions .thc__btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .thc, .thc-modal { animation: none; } .thc-switch span, .thc-switch span::after { transition: none; } }

/* ── Rozloženia: center (okno v strede) a bar (pruh dole), s prepínačmi v prvej vrstve ── */
.thc__toggles { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: 0 0 16px; }
.thc__toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.thc__toggle-name { white-space: nowrap; }
.thc-switch.is-locked { opacity: 0.55; cursor: default; }
.thc-switch.is-locked input { cursor: default; }
.thc__more { background: none; border: none; padding: 4px 2px; font: inherit; font-size: 13px; font-weight: 600; color: #4338ca; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.thc__more:hover { color: #312e81; }

.thc-backdrop { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(22, 23, 29, 0.55); backdrop-filter: blur(3px); animation: thc-fade 0.2s ease both; font-family: 'Inter', Helvetica, Arial, sans-serif; }
.thc--center { position: relative; left: auto; bottom: auto; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px 28px 22px; border-radius: 22px; }
.thc--center .thc__title { font-size: 20px; }
.thc--center .thc__text { font-size: 14.5px; }
.thc--center .thc__toggles { padding: 14px 0; border-top: 1px solid #e6e6ec; border-bottom: 1px solid #e6e6ec; margin-bottom: 18px; }
.thc--center .thc__actions { gap: 10px; }

.thc--bar { left: 0; right: 0; bottom: 0; width: auto; padding: 18px max(24px, calc((100vw - 1240px) / 2)) 18px; border-radius: 22px 22px 0 0; border-width: 1px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 40px; row-gap: 4px; align-items: center; }
.thc--bar .thc__title { grid-column: 1; }
.thc--bar .thc__text { grid-column: 1; margin: 2px 0 6px; }
.thc--bar .thc__toggles { grid-column: 1; margin: 0; }
.thc--bar .thc__actions { grid-column: 2; grid-row: 1 / span 3; width: min(520px, 42vw); align-self: center; }
@media (max-width: 860px) {
  .thc--bar { grid-template-columns: 1fr; padding: 16px 16px 16px; max-height: 88vh; overflow-y: auto; }
  .thc--bar .thc__actions { grid-column: 1; grid-row: auto; width: auto; margin-top: 12px; }
}
@media (max-width: 560px) {
  .thc--center { padding: 22px 18px 16px; }
  .thc__actions { flex-direction: column; }
}

/* Podrobnosti o cookies pri kategórii: viditeľné, ale nie rušivé (farba témy, bez podčiarknutia, bez počtu) */
.thc-cat__more { margin-top: 10px; }
.thc-cat__more summary { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; padding: 4px 12px 4px 8px; margin-left: -8px; border-radius: 100px; font-size: 13px; font-weight: 600; color: #4338ca; transition: background 0.15s; }
.thc-cat__more summary::-webkit-details-marker { display: none; }
.thc-cat__more summary::before { content: '▸'; font-size: 11px; transition: transform 0.15s; }
.thc-cat__more[open] summary::before { transform: rotate(90deg); }
.thc-cat__more summary:hover { background: #eef0fd; }
.thc-cat__table { margin-top: 10px; overflow-x: auto; border: 1px solid #e6e6ec; border-radius: 12px; }
.thc-cat__table table { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.4; }
.thc-cat__table th { padding: 8px 12px; text-align: left; background: #f6f6f9; font-weight: 700; white-space: nowrap; }
.thc-cat__table td { padding: 8px 12px; vertical-align: top; border-top: 1px solid #eeeef3; color: #3b3c47; }
.thc-cat__table code { font-size: 12px; background: #f0f0f4; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
@media (max-width: 560px) { .thc-cat__table code { white-space: normal; word-break: break-all; } }
@media (max-width: 560px) {
  .thc-cat__table thead { display: none; }
  .thc-cat__table td { display: block; padding: 4px 12px; border-top: none; }
  .thc-cat__table tr { display: block; padding: 6px 0; border-top: 1px solid #eeeef3; }
  .thc-cat__table tr:first-child { border-top: none; }
  .thc-cat__table td::before { content: attr(data-l) ': '; font-weight: 700; }
}


/* Pruh dole: výrazný (silnejší tieň a fialový prúžok), ale stránku neblokuje */
.thc--bar { border-top: 3px solid #5b4fe0; box-shadow: 0 -18px 48px -12px rgba(22, 23, 29, 0.35); }

/* Karta vľavo hore: v rohu (rovnaká pozícia ako doterajšia lišta), prekrýva začiatok hlavičky, takže si ju nemožno nevšimnúť. */
.thc--topleft { bottom: auto; top: 24px; left: 24px; animation-name: thc-in-top; }
@keyframes thc-in-top { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .thc--topleft { top: 12px; left: 12px; right: 12px; } }

/* Poistka pre úzke displeje: karta a jej obsah nikdy nepresiahnu šírku obrazovky */
@media (max-width: 560px) {
  .thc, .thc--topleft, .thc--card { box-sizing: border-box; left: 12px; right: 12px; width: auto; max-width: calc(100vw - 24px); }
  .thc__text, .thc__title { overflow-wrap: anywhere; }
  .thc__btn { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .thc__actions { width: 100%; }
}
