/* Cookie consent banner and settings dialog — shared by every public page.
   Deliberately self-contained: 404.html and koszonjuk.html reset almost
   nothing, so every rule that matters is stated here rather than inherited.
   Palette and shapes follow index.html (--black/--white/--g200/--g400/--g600,
   Inter, 100px pills). */

.ac-banner, .ac-modal, .ac-modal * , .ac-banner * { box-sizing: border-box; }

.ac-banner, .ac-modal {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #0a0a0a;
}

/* ── the banner ─────────────────────────────────────────────────────────── */
.ac-banner {
  position: fixed; z-index: 2147483000;
  left: 24px; bottom: 24px; width: 420px; max-width: calc(100vw - 48px);
  background: #fff; border: 1px solid #e8e8e8; border-radius: 20px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.06);
  animation: acRise .38s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes acRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ac-banner { animation: none; } }

.ac-banner h2 {
  margin: 0 0 8px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.3; color: #0a0a0a;
}
.ac-banner p {
  margin: 0 0 18px; font-size: 13.5px; line-height: 1.55; color: #666;
}
.ac-banner p a { color: #0a0a0a; text-decoration: underline; text-underline-offset: 2px; }

.ac-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ── buttons ────────────────────────────────────────────────────────────── */
.ac-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 13.5px; font-weight: 500; line-height: 1;
  padding: 12px 20px; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  /* .5s, not .4s: the same press curve and the same duration as .btn-pill, so
     the consent bar's black button answers exactly like the nav one */
  transition: transform .5s cubic-bezier(0.22,1,0.36,1), opacity .5s cubic-bezier(0.22,1,0.36,1), background .2s ease, border-color .2s ease;
}
.ac-btn:hover { transform: scale(1.03); }
.ac-btn:active { transform: scale(.965); transition-duration: .12s; }
@media (hover: none) { .ac-btn:hover { transform: none; } }

.ac-btn-primary { background: #0a0a0a; color: #fff; }
.ac-btn-primary:hover { opacity: .9; }
.ac-btn-secondary { background: #fff; color: #0a0a0a; border-color: #e8e8e8; }
.ac-btn-secondary:hover { border-color: #a0a0a0; }
.ac-btn-quiet {
  background: none; color: #666; padding: 12px 10px; border-radius: 8px;
  text-decoration: underline; text-underline-offset: 3px;
}
.ac-btn-quiet:hover { color: #0a0a0a; transform: none; }

/* ── the settings dialog ────────────────────────────────────────────────── */
.ac-modal {
  position: fixed; inset: 0; z-index: 2147483001;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(10,10,10,.42);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: acFade .25s ease both;
  overflow-y: auto;
}
@keyframes acFade { from { opacity: 0; } to { opacity: 1; } }

.ac-panel {
  background: #fff; border-radius: 24px; width: 600px; max-width: 100%;
  max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,.28);
  animation: acRise .32s cubic-bezier(0.22,1,0.36,1) both;
}
@media (prefers-reduced-motion: reduce) { .ac-modal, .ac-panel { animation: none; } }

.ac-panel-head {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 26px 26px 0;
}
.ac-panel-head h2 {
  margin: 0; flex: 1; font-size: 20px; font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.25; color: #0a0a0a;
}
.ac-close {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid #e8e8e8; background: #fff; color: #0a0a0a;
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s ease, background .2s ease;
}
.ac-close:hover { border-color: #a0a0a0; background: #fafafa; }

.ac-panel-body { padding: 14px 26px 4px; overflow-y: auto; }
.ac-intro { margin: 0 0 18px; font-size: 13.5px; line-height: 1.6; color: #666; }
.ac-intro a { color: #0a0a0a; text-decoration: underline; text-underline-offset: 2px; }

.ac-cat {
  border: 1px solid #e8e8e8; border-radius: 16px;
  padding: 16px 18px; margin-bottom: 10px;
}
.ac-cat-head { display: flex; align-items: center; gap: 14px; }
.ac-cat-head h3 {
  margin: 0; flex: 1; font-size: 14.5px; font-weight: 600;
  letter-spacing: -0.01em; color: #0a0a0a;
}
.ac-cat p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.55; color: #666; }
.ac-cat .ac-vendors {
  margin: 8px 0 0; padding: 0; list-style: none;
  font-size: 12px; line-height: 1.7; color: #a0a0a0;
}
.ac-cat .ac-vendors li::before { content: '·'; margin-right: 7px; }

.ac-locked { font-size: 12px; font-weight: 500; color: #a0a0a0; white-space: nowrap; }

/* switch */
.ac-switch { position: relative; flex: none; width: 44px; height: 26px; }
.ac-switch input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer; z-index: 1;
}
.ac-switch span {
  position: absolute; inset: 0; border-radius: 100px;
  background: #e8e8e8; transition: background .22s ease;
  pointer-events: none;
}
.ac-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(0,0,0,.22);
  transition: transform .22s cubic-bezier(0.22,1,0.36,1);
}
.ac-switch input:checked + span { background: #0a0a0a; }
.ac-switch input:checked + span::after { transform: translateX(18px); }
.ac-switch input:focus-visible + span { outline: 2px solid #0a0a0a; outline-offset: 2px; }

.ac-panel-foot {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 18px 26px 26px;
  border-top: 1px solid #f0f0f0; margin-top: 14px;
}
.ac-panel-foot .ac-spacer { flex: 1 1 auto; }
/* "save" and "accept all" wrap as a pair rather than the primary button
   dropping to a row of its own — the Hungarian labels are long enough to
   push it over on a narrow panel */
.ac-foot-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.ac-panel-foot .ac-btn-quiet { padding-left: 4px; padding-right: 4px; }

/* the footer entry point is an <a> without href, so it needs the pointer */
[data-cookie-settings] { cursor: pointer; }

@media (max-width: 640px) {
  .ac-banner {
    left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none;
    padding: 20px; border-radius: 18px;
  }
  .ac-actions .ac-btn { flex: 1 1 auto; }
  .ac-actions .ac-btn-quiet { flex-basis: 100%; }
  .ac-modal { padding: 0; align-items: flex-end; }
  .ac-panel { border-radius: 22px 22px 0 0; max-height: 92vh; width: 100%; }
  .ac-panel-head { padding: 22px 20px 0; }
  .ac-panel-body { padding: 12px 20px 4px; }
  .ac-panel-foot { padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); }
  .ac-panel-foot .ac-btn { flex: 1 1 auto; }
  .ac-panel-foot .ac-spacer { display: none; }
  .ac-foot-actions { flex: 1 1 100%; }
}
