/* HOCL / EWCO cookie-consent banner — draft, no third-party CMP.
   Fixed overlay: does not reserve layout space (no CLS).
   Themes: data-cc-theme="hocl" | "ewco" on #cc-root.
*/
#cc-root {
  --cc-ink: #0F1E2B;
  --cc-muted: #4A5866;
  --cc-line: #E3E8ED;
  --cc-bg: #F7F9FB;
  --cc-surface: #fff;
  --cc-brand: #0077B6;
  --cc-brand-d: #005A8C;
  --cc-focus: #F59E0B;
  --cc-r: 14px;
  --cc-shadow: 0 24px 50px rgba(15, 30, 43, 0.16);
  box-sizing: border-box;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--cc-ink);
  -webkit-font-smoothing: antialiased;
}
#cc-root[data-cc-theme="ewco"] {
  --cc-brand: #3F7A12;
  --cc-brand-d: #336410;
  --cc-focus: #00AEEF;
}
#cc-root *,
#cc-root *::before,
#cc-root *::after { box-sizing: border-box; }

#cc-root.cc-hidden { display: none !important; }

#cc-bar {
  position: fixed;
  z-index: 10000;
  inset-inline: 0;
  bottom: 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}
#cc-panel {
  pointer-events: auto;
  max-width: 1160px;
  margin: 0 auto;
  background: var(--cc-surface);
  color: var(--cc-ink);
  border: 1px solid var(--cc-line);
  border-radius: var(--cc-r);
  box-shadow: var(--cc-shadow);
  padding: 20px 24px;
  /* SEO r2: keep the customize panel on screen on short phones
     and in longer translations. English store 390 already fills
     844px with no leftover scroll room. */
  max-height: calc(100vh - 24px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#cc-panel:focus { outline: none; }
#cc-title {
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 8px;
}
#cc-body {
  margin: 0 0 16px;
  color: var(--cc-muted);
  font-size: 0.95rem;
}
#cc-body a {
  color: var(--cc-brand);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#cc-body a:hover { color: var(--cc-brand-d); }

#cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
#cc-actions .cc-btn {
  appearance: none;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 999px;
  min-height: 44px;
  min-width: 160px;
  padding: 0.7rem 1.35rem;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex: 1 1 160px;
  max-width: 280px;
}
/* Accept and Reject: identical treatment. Same size, typography,
   padding, fill, border, and contrast. Neither is the only primary.
   Customize stays a lighter third choice. */
#cc-root #cc-actions #cc-btn-accept,
#cc-root #cc-actions #cc-btn-reject {
  background: #fff;
  color: var(--cc-brand-d);
  border: 2px solid var(--cc-brand);
  box-shadow: inset 0 0 0 2px var(--cc-brand);
}
#cc-root #cc-actions #cc-btn-accept:hover,
#cc-root #cc-actions #cc-btn-reject:hover {
  background: var(--cc-bg);
  color: var(--cc-brand-d);
  border-color: var(--cc-brand-d);
  box-shadow: inset 0 0 0 2px var(--cc-brand-d);
}
#cc-root #cc-actions #cc-btn-customize {
  background: #fff;
  color: var(--cc-ink);
  border: 2px solid var(--cc-line);
  font-weight: 550;
}
#cc-root #cc-actions #cc-btn-customize:hover {
  border-color: var(--cc-ink);
}
#cc-root #cc-actions #cc-btn-save {
  background: #fff;
  color: var(--cc-ink);
  border: 2px solid var(--cc-ink);
}
#cc-root #cc-actions #cc-btn-save:hover {
  background: var(--cc-bg);
}

#cc-root :focus-visible {
  outline: 3px solid var(--cc-focus);
  outline-offset: 3px;
}

#cc-customize {
  display: none;
  margin: 4px 0 16px;
  padding-top: 4px;
  border-top: 1px solid var(--cc-line);
}
#cc-root.cc-open-customize #cc-customize { display: block; }
#cc-actions #cc-btn-save { display: none; }
#cc-root.cc-open-customize #cc-actions #cc-btn-customize { display: none; }
#cc-root.cc-open-customize #cc-actions #cc-btn-save { display: inline-flex; }

.cc-cat {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--cc-line);
}
.cc-cat:last-of-type { border-bottom: 0; }
.cc-cat h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cc-cat p {
  margin: 0;
  color: var(--cc-muted);
  font-size: 0.9rem;
}
.cc-cat-text { flex: 1; min-width: 0; }

.cc-switch {
  appearance: none;
  flex: none;
  width: 48px;
  height: 28px;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #C9D3DC;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.cc-switch::after {
  content: "";
  position: absolute;
  inset-block: 3px;
  inset-inline-start: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 30, 43, 0.25);
  transition: transform 0.15s;
}
.cc-switch[aria-checked="true"] { background: var(--cc-brand); }
.cc-switch[aria-checked="true"]::after {
  transform: translateX(20px);
}
[dir="rtl"] .cc-switch[aria-checked="true"]::after,
#cc-root[dir="rtl"] .cc-switch[aria-checked="true"]::after {
  transform: translateX(-20px);
}
@media (max-width: 720px) {
  #cc-panel { padding: 16px; }
  #cc-actions .cc-btn {
    flex: 1 1 100%;
    max-width: none;
  }
}
@media (max-width: 390px) {
  #cc-bar { padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
  #cc-title { font-size: 1rem; }
  #cc-body { font-size: 0.92rem; }
}

@media (prefers-reduced-motion: reduce) {
  #cc-actions .cc-btn,
  .cc-switch,
  .cc-switch::after { transition: none; }
}

.cc-always-on {
  flex: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cc-muted);
  margin: 6px 0 0;
  white-space: nowrap;
}
#cc-privacy { margin: -8px 0 16px; font-size: 0.95rem; }
#cc-privacy a { color: var(--cc-brand); font-weight: 650; }
#cc-cookie-policy { margin: -8px 0 16px; font-size: 0.95rem; }
#cc-cookie-policy a { color: var(--cc-brand); font-weight: 650; }

.cc-nowrap { white-space: nowrap; }
