/* Cookie Consent – frontend (Apple-style, vanilla, theme-independent) */
#cc-root {
  --cc-accent: #0071e3;
  --cc-bg: #fff;
  --cc-text: #1d1d1f;
  --cc-muted: #6e6e73;
  --cc-overlay: rgba(0, 0, 0, .45);
  --cc-radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#cc-root[data-theme="dark"] {
  --cc-bg: #1c1c1e;
  --cc-text: #f5f5f7;
  --cc-muted: #a1a1a6;
}

#cc-overlay {
  position: fixed; inset: 0; z-index: 2147483000;
  background: var(--cc-overlay);
  backdrop-filter: saturate(120%) blur(2px);
  animation: cc-fade .25s ease;
}

/* ---------- Banner ---------- */
.cc-banner {
  position: fixed; z-index: 2147483001;
  background: var(--cc-bg); color: var(--cc-text);
  border-radius: var(--cc-radius);
  box-shadow: 0 12px 48px rgba(0, 0, 0, .22), 0 2px 8px rgba(0, 0, 0, .1);
  padding: 22px 24px;
  animation: cc-slide .35s cubic-bezier(.2, .8, .2, 1);
}

/* box (rohové okno) */
#cc-root[data-layout="box"] .cc-banner { bottom: 22px; max-width: 420px; width: calc(100% - 44px); }
#cc-root[data-layout="box"][data-position="left"] .cc-banner { left: 22px; }
#cc-root[data-layout="box"][data-position="right"] .cc-banner { right: 22px; }

/* lišta dole / nahoře */
#cc-root[data-layout="bar_bottom"] .cc-banner,
#cc-root[data-layout="bar_top"] .cc-banner {
  left: 16px; right: 16px; width: auto; max-width: none;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
#cc-root[data-layout="bar_bottom"] .cc-banner { bottom: 16px; }
#cc-root[data-layout="bar_top"] .cc-banner { top: 16px; }
#cc-root[data-layout="bar_bottom"] .cc-banner__body,
#cc-root[data-layout="bar_top"] .cc-banner__body { flex: 1 1 320px; }

/* modal (uprostřed) */
#cc-root[data-layout="modal"] .cc-banner {
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  max-width: 460px; width: calc(100% - 44px);
}

.cc-title { font-size: 18px; font-weight: 600; margin: 0 0 8px; letter-spacing: -.01em; }
.cc-desc { font-size: 14px; line-height: 1.5; color: var(--cc-muted); margin: 0 0 12px; }
.cc-policy { font-size: 13px; color: var(--cc-accent); text-decoration: none; }
.cc-policy:hover { text-decoration: underline; }

.cc-banner__actions, .cc-prefs__actions {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px;
}
#cc-root[data-layout="bar_bottom"] .cc-banner__actions,
#cc-root[data-layout="bar_top"] .cc-banner__actions { margin-top: 0; }

/* ---------- Tlačítka ---------- */
.cc-btn {
  appearance: none; border: 0; cursor: pointer;
  font-size: 14px; font-weight: 500; line-height: 1;
  padding: 12px 20px; border-radius: 980px;
  transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease;
}
.cc-btn:hover { transform: translateY(-1px); }
.cc-btn:active { transform: translateY(0); opacity: .85; }
.cc-btn:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; }
.cc-btn--accept { background: var(--cc-accept-bg); color: var(--cc-accept-text); flex: 1 1 auto; }
.cc-btn--reject { background: var(--cc-reject-bg); color: var(--cc-reject-text); }
.cc-btn--settings { background: var(--cc-settings-bg); color: var(--cc-settings-text); box-shadow: inset 0 0 0 1px currentColor; }

/* ---------- Centrum předvoleb ---------- */
.cc-prefs {
  position: fixed; z-index: 2147483002;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--cc-bg); color: var(--cc-text);
  border-radius: var(--cc-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  padding: 26px; width: calc(100% - 40px); max-width: 520px;
  max-height: 86vh; overflow: auto;
  animation: cc-pop .3s cubic-bezier(.2, .8, .2, 1);
}
.cc-prefs__head { display: flex; align-items: center; justify-content: space-between; }
.cc-close { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--cc-muted); cursor: pointer; }
.cc-cats { margin: 18px 0; display: flex; flex-direction: column; gap: 4px; }
.cc-cat { padding: 14px 0; border-bottom: 1px solid rgba(128, 128, 128, .18); }
.cc-cat:last-child { border-bottom: 0; }
.cc-cat__top { display: flex; align-items: center; gap: 12px; }
.cc-cat__title { font-size: 15px; font-weight: 600; flex: 1; }
.cc-cat__desc { font-size: 13px; line-height: 1.45; color: var(--cc-muted); margin: 6px 0 0; }
.cc-badge { font-size: 11px; color: var(--cc-muted); background: rgba(128, 128, 128, .15); padding: 3px 8px; border-radius: 6px; }

/* Granulární služby pod kategorií */
.cc-services { margin: 10px 0 2px; padding-left: 12px; border-left: 2px solid rgba(128, 128, 128, .2); display: flex; flex-direction: column; gap: 10px; }
.cc-service__top { display: flex; align-items: center; gap: 10px; }
.cc-service__name { font-size: 13.5px; font-weight: 500; flex: 1; }
.cc-service__desc { font-size: 12px; color: var(--cc-muted); margin: 4px 0 0; line-height: 1.4; }
.cc-switch--sm { width: 40px; height: 24px; }
.cc-switch--sm .cc-switch__slider::before { height: 20px; width: 20px; }
.cc-switch--sm input:checked + .cc-switch__slider::before { transform: translateX(16px); }

/* Placeholder pro zablokované embedy (iframe) */
.cc-iframe-ph { position: relative; background: #f0f0f3; border: 1px dashed #c4c9d2; border-radius: 12px; min-height: 180px; display: flex; align-items: center; justify-content: center; width: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.cc-iframe-ph__inner { text-align: center; padding: 24px; max-width: 440px; }
.cc-iframe-ph__inner p { font-size: 14px; color: #6e6e73; margin: 0 0 14px; line-height: 1.5; }
.cc-iframe-ph__btn { background: #0071e3; color: #fff; border: 0; border-radius: 980px; padding: 10px 22px; font-size: 14px; font-weight: 500; cursor: pointer; transition: transform .12s ease; }
.cc-iframe-ph__btn:hover { transform: translateY(-1px); }

/* RTL podpora */
html[dir="rtl"] #cc-root[data-align="left"] .cc-banner__body { text-align: right; }
html[dir="rtl"] #cc-root[data-float-side="left"] .cc-float { left: auto; right: 18px; }
html[dir="rtl"] #cc-root[data-float-side="right"] .cc-float { right: auto; left: 18px; }
html[dir="rtl"] .cc-iframe-ph__inner { direction: rtl; }

/* Souhlasové checkboxy v registračním formuláři */
.cc-consent-fields { margin: 10px 0; }
.cc-consent-field { margin-bottom: 8px; }
.cc-consent-checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.cc-consent-checkbox input { margin-top: 3px; flex: 0 0 auto; }
.cc-consent-checkbox sup { color: #d93025; }

/* Odkaz „Moje soukromí" v účtu (panel i menu) */
.cc-account-link { display: inline-flex; align-items: center; gap: 10px; padding: 13px 18px; border: 1px solid #e5e5ea; border-radius: 12px; background: #fff; color: inherit; text-decoration: none; margin: 6px 0; transition: box-shadow .15s, transform .12s; }
.cc-account-link:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .08); transform: translateY(-1px); text-decoration: none; color: inherit; }
.cc-account-link .material-icons { font-size: 22px; flex: 0 0 auto; color: #0071e3; }

/* Stránka „Moje soukromí" v zákaznickém účtu */
.cc-privacy { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.cc-privacy__title { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 12px; }
.cc-privacy__intro { color: #6e6e73; margin: 0 0 24px; font-size: 15px; line-height: 1.5; }
.cc-privacy__history { margin-top: 28px; }
.cc-privacy__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 28px; }
.cc-privacy__card { border: 1px solid #e5e5ea; border-radius: 14px; padding: 20px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .05); }
.cc-privacy__card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.cc-privacy__card p { color: #6e6e73; font-size: 13.5px; line-height: 1.5; margin: 0 0 14px; }
.cc-privacy__card .btn { margin: 4px 8px 4px 0; }
.cc-privacy__card textarea { width: 100%; }
.cc-privacy h3 { margin-top: 28px; margin-bottom: 12px; font-size: 17px; font-weight: 600; }
.cc-privacy .table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cc-privacy .table th { text-align: left; padding: 9px 10px; border-bottom: 2px solid #e5e5ea; font-weight: 600; }
.cc-privacy .table td { padding: 8px 10px; border-bottom: 1px solid #ededf0; }
.cc-privacy__requests { font-size: 13px; }

/* Tabulka cookies (deklarace) na CMS stránce */
.cc-decl-table { width: 100%; border-collapse: collapse; font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.cc-decl-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid #e5e5ea; font-weight: 600; }
.cc-decl-table td { padding: 9px 12px; border-bottom: 1px solid #ededf0; vertical-align: top; }
.cc-decl-table tr:last-child td { border-bottom: 0; }

/* iOS přepínač */
.cc-switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: 0 0 auto; }
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-switch__slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #d1d1d6; border-radius: 980px; transition: background .25s ease;
}
.cc-switch__slider::before {
  content: ""; position: absolute; height: 24px; width: 24px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .25s ease;
}
.cc-switch input:checked + .cc-switch__slider { background: var(--cc-toggle-on, #34c759); }
.cc-switch input:checked + .cc-switch__slider::before { transform: translateX(18px); }
.cc-toggle[disabled] + .cc-switch__slider { opacity: .55; cursor: not-allowed; }

/* ---------- Plovoucí tlačítko ---------- */
.cc-float {
  position: fixed; bottom: var(--cc-float-offset, 18px); z-index: 2147482999;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--cc-float-bg, var(--cc-accent)); color: var(--cc-float-icon, #fff);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transition: transform .15s ease;
}
#cc-root[data-float-side="left"] .cc-float { left: 18px; right: auto; }
#cc-root[data-float-side="right"] .cc-float { right: 18px; left: auto; }
.cc-float:hover { transform: scale(1.08); }

/* ---------- Animace ---------- */
@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cc-slide { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cc-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.94); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
#cc-root[data-layout="modal"] .cc-banner { animation: cc-pop .3s cubic-bezier(.2, .8, .2, 1); }

@media (max-width: 560px) {
  #cc-root[data-layout="box"] .cc-banner { left: 12px; right: 12px; width: auto; bottom: 12px; }
  .cc-banner__actions, .cc-prefs__actions { flex-direction: column; }
  .cc-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-prefs, #cc-overlay, .cc-float { animation: none; transition: none; }
}

/* ---- Zarovnání textů v okně (data-align) ---- */
#cc-root[data-align="center"] .cc-banner__body { text-align: center; }
#cc-root[data-align="center"] .cc-banner__actions { justify-content: center; }
#cc-root[data-align="center"] .cc-policy { display: inline-block; }

/* ============================================================
   VZHLEDOVÉ VARIANTY (skiny) – data-skin na #cc-root
   apple = výchozí (definováno výše). Níže minimal a bold.
   ============================================================ */

/* ---- MINIMAL: plochý, tenký, střízlivý ---- */
#cc-root[data-skin="minimal"] .cc-banner {
  border-radius: 10px; padding: 18px 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .10);
  border: 1px solid rgba(0, 0, 0, .10);
}
#cc-root[data-skin="minimal"][data-theme="dark"] .cc-banner { border-color: rgba(255, 255, 255, .12); }
#cc-root[data-skin="minimal"] .cc-title { font-size: 16px; font-weight: 600; }
#cc-root[data-skin="minimal"] .cc-desc { font-size: 13px; }
#cc-root[data-skin="minimal"] .cc-btn { border-radius: 8px; padding: 10px 16px; font-weight: 600; }
#cc-root[data-skin="minimal"] .cc-btn--accept { flex: 0 1 auto; }
#cc-root[data-skin="minimal"] .cc-prefs { border-radius: 10px; }
#cc-root[data-skin="minimal"] .cc-float { border-radius: 10px; }

/* ---- BOLD: výrazný, akcentový pruh, velká tlačítka ---- */
#cc-root[data-skin="bold"] .cc-banner {
  border-radius: 22px; padding: 26px;
  border-top: 5px solid var(--cc-accent);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .30);
}
#cc-root[data-skin="bold"] .cc-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
#cc-root[data-skin="bold"] .cc-desc { font-size: 14.5px; }
#cc-root[data-skin="bold"] .cc-btn { padding: 14px 22px; font-size: 15px; font-weight: 600; }
#cc-root[data-skin="bold"] .cc-banner__actions .cc-btn--accept { flex-basis: 100%; order: -1; }
#cc-root[data-skin="bold"] .cc-prefs { border-radius: 22px; border-top: 5px solid var(--cc-accent); }

/* ---- GLASS: matné sklo (glassmorphism) ---- */
#cc-root[data-skin="glass"] .cc-banner,
#cc-root[data-skin="glass"] .cc-prefs {
  background: rgba(255, 255, 255, .62);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
#cc-root[data-skin="glass"][data-theme="dark"] .cc-banner,
#cc-root[data-skin="glass"][data-theme="dark"] .cc-prefs { background: rgba(28, 28, 30, .55); border-color: rgba(255, 255, 255, .14); }

/* ---- CONTRAST: ostrý černobílý ---- */
#cc-root[data-skin="contrast"] .cc-banner,
#cc-root[data-skin="contrast"] .cc-prefs {
  background: #000; color: #fff; border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
#cc-root[data-skin="contrast"] .cc-title { color: #fff; }
#cc-root[data-skin="contrast"] .cc-desc { color: rgba(255, 255, 255, .75); }
#cc-root[data-skin="contrast"] .cc-policy { color: #fff; text-decoration: underline; }
#cc-root[data-skin="contrast"] .cc-btn { border-radius: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 13px; }
#cc-root[data-skin="contrast"] .cc-btn--accept { background: #fff; color: #000; }
#cc-root[data-skin="contrast"] .cc-btn--reject { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
#cc-root[data-skin="contrast"] .cc-btn--settings { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }

/* ---- GRADIENT: barevný přechod ---- */
#cc-root[data-skin="gradient"] .cc-banner,
#cc-root[data-skin="gradient"] .cc-prefs {
  background: linear-gradient(135deg, var(--cc-accent), #8e44ff);
  color: #fff; border-radius: 20px; box-shadow: 0 16px 46px rgba(0, 0, 0, .28);
}
#cc-root[data-skin="gradient"] .cc-title { color: #fff; }
#cc-root[data-skin="gradient"] .cc-desc { color: rgba(255, 255, 255, .88); }
#cc-root[data-skin="gradient"] .cc-policy { color: #fff; text-decoration: underline; }
#cc-root[data-skin="gradient"] .cc-btn--accept { background: #fff; color: var(--cc-accent); }
#cc-root[data-skin="gradient"] .cc-btn--reject { background: rgba(255, 255, 255, .18); color: #fff; }
#cc-root[data-skin="gradient"] .cc-btn--settings { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }

/* ---- NEUMORPHIC: měkké vystouplé stíny ---- */
#cc-root[data-skin="neumorphic"] .cc-banner,
#cc-root[data-skin="neumorphic"] .cc-prefs {
  background: #e8ebf0; color: #3a3f47; border: none; border-radius: 24px;
  box-shadow: 12px 12px 30px #c5c9d0, -12px -12px 30px #ffffff;
}
#cc-root[data-skin="neumorphic"] .cc-desc { color: #6b7280; }
#cc-root[data-skin="neumorphic"] .cc-btn {
  background: #e8ebf0; color: #3a3f47; border-radius: 14px;
  box-shadow: 5px 5px 12px #c5c9d0, -5px -5px 12px #ffffff;
}
#cc-root[data-skin="neumorphic"] .cc-btn--accept { color: var(--cc-accent); font-weight: 700; }
#cc-root[data-skin="neumorphic"] .cc-btn:active { box-shadow: inset 3px 3px 8px #c5c9d0, inset -3px -3px 8px #ffffff; }

/* ---- OUTLINE: akcentový rámeček, plochý ---- */
#cc-root[data-skin="outline"] .cc-banner,
#cc-root[data-skin="outline"] .cc-prefs {
  background: var(--cc-bg); border: 2.5px solid var(--cc-accent); border-radius: 14px; box-shadow: none;
}
#cc-root[data-skin="outline"] .cc-btn { border-radius: 8px; }
#cc-root[data-skin="outline"] .cc-btn--reject { background: transparent; color: var(--cc-accent); box-shadow: inset 0 0 0 1.5px var(--cc-accent); }
