/* cookie-consent.css — restyle with the --cc-* variables first; touch layout rules last. */

.cc-root {
  /* the dark SALELOGICS look: blue accent for links, switches and focus; the two button treatments
     of the site (green pill, orange pill) for accept and reject, so both are equally prominent */
  --cc-bg: #14202c;
  --cc-fg: #ffffff;
  --cc-muted: rgba(255, 255, 255, 0.7);
  --cc-border: rgba(255, 255, 255, 0.16);
  --cc-primary: hsl(200 100% 55%);
  --cc-primary-fg: #08121a;
  --cc-radius: 22px;
  --cc-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --cc-font: inherit;
  --cc-z: 99999;

  font-family: var(--cc-font);
  color: var(--cc-fg);
  line-height: 1.55;
  font-size: 15px;
}
.cc-root *, .cc-root *::before, .cc-root *::after { box-sizing: border-box; }
.cc-root [hidden] { display: none !important; }

/* ---------- first layer: banner ---------- */
.cc-banner {
  position: fixed; z-index: var(--cc-z);
  background: var(--cc-bg); color: var(--cc-fg);
  border: 1px solid var(--cc-border); box-shadow: var(--cc-shadow);
  padding: 20px 22px;
  display: flex; gap: 20px; align-items: center; justify-content: space-between;
  animation: cc-rise .25s ease-out;
}
.cc-banner--bar { left: 16px; right: 16px; bottom: 16px; max-width: 1100px; margin: 0 auto; border-radius: var(--cc-radius); }
.cc-banner--box-left, .cc-banner--box-right {
  bottom: 16px; width: min(420px, calc(100vw - 32px)); border-radius: var(--cc-radius);
  flex-direction: column; align-items: stretch; gap: 14px;
}
.cc-banner--box-left { left: 16px; }
.cc-banner--box-right { right: 16px; }

.cc-title { margin: 0 0 6px; font-family: var(--font-display, inherit); font-size: 1.15rem; font-weight: 700; line-height: 1.3; color: inherit; }
.cc-text { margin: 0; color: var(--cc-muted); }
.cc-links { margin: 6px 0 0; font-size: .9rem; }
.cc-links a { color: var(--cc-primary); text-decoration: underline; text-underline-offset: 2px; }

.cc-modal-open .cc-banner { visibility: hidden; }   /* one layer at a time while preferences are open */

.cc-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cc-banner--box-left .cc-actions, .cc-banner--box-right .cc-actions { flex-direction: column; }

/* ---------- buttons: accept and reject deliberately share size, weight and placement level ---------- */
.cc-btn {
  font: inherit; font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.2;
  min-height: 48px; min-width: 128px; padding: 12px 22px;
  border-radius: 999px; border: 0; cursor: pointer;
  transition: filter .2s ease, transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.cc-btn:hover { filter: brightness(1.07); transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(0, 0, 0, 0.6); }
.cc-btn--primary { background: linear-gradient(180deg, #6bf7b2 0%, #2f7d57 100%); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28); }
.cc-btn--secondary { background: linear-gradient(90deg, #ffb326 0%, #ffd21f 100%); color: #101923; }
.cc-btn--outline { background: rgba(255, 255, 255, 0.06); color: var(--cc-fg); border: 1px solid var(--cc-border); }
.cc-btn--outline:hover { background: color-mix(in oklch, var(--cc-primary) 14%, transparent); border-color: var(--cc-primary); filter: none; box-shadow: none; }

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

/* ---------- second layer: preferences modal ---------- */
.cc-overlay {
  position: fixed; inset: 0; z-index: calc(var(--cc-z) + 1);
  background: rgba(6, 12, 18, .72); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: cc-fade .2s ease-out;
}
.cc-modal {
  background: var(--cc-bg); color: var(--cc-fg); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow);
  width: min(640px, 100%); max-height: min(88vh, 760px); display: flex; flex-direction: column; overflow: hidden;
}
.cc-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 8px; }
.cc-modal-head .cc-title { margin: 0; font-size: 1.25rem; }
.cc-close {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--cc-fg);
  font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.cc-close:hover { background: rgba(127,127,127,.15); }
.cc-modal-body { padding: 4px 22px 16px; overflow-y: auto; }
.cc-modal-foot {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  padding: 14px 22px; border-top: 1px solid var(--cc-border);
}

.cc-cats { margin-top: 14px; display: grid; gap: 12px; }
.cc-cat { border: 1px solid var(--cc-border); border-radius: 16px; padding: 14px 16px; background: rgba(255, 255, 255, 0.03); }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-cat-name { font-weight: 700; cursor: pointer; }
.cc-cat-desc { margin: 6px 0 0; color: var(--cc-muted); font-size: .92rem; }
.cc-always { font-size: .85rem; font-weight: 600; color: var(--cc-primary); }

/* switch */
.cc-switch { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; }
.cc-check { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cc-check--hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cc-slider { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.28); transition: background-color .2s ease; }
.cc-slider::before {
  content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .2s ease;
}
.cc-check:checked + .cc-slider { background: var(--cc-primary); }
.cc-check:checked + .cc-slider::before { transform: translateX(20px); }
.cc-check:focus-visible + .cc-slider { outline: 3px solid var(--cc-primary); outline-offset: 2px; }

/* cookie table */
.cc-details { margin-top: 10px; font-size: .9rem; }
.cc-details summary { cursor: pointer; color: var(--cc-primary); font-weight: 600; padding: 4px 0; }
.cc-empty { color: var(--cc-muted); margin: 8px 0 0; }
.cc-table-wrap { overflow-x: auto; margin-top: 8px; }
.cc-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.cc-table th, .cc-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--cc-border); vertical-align: top; }
.cc-table th { color: var(--cc-muted); font-weight: 600; }
.cc-table td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }

/* ---------- revisit button ---------- */
.cc-revisit {
  position: fixed; bottom: 16px; z-index: calc(var(--cc-z) - 1);
  width: 48px; height: 48px; border-radius: 50%; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cc-bg); color: var(--cc-fg); border: 1px solid var(--cc-border);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6); cursor: pointer;
  transition: transform .15s ease;
}
.cc-revisit:hover { transform: scale(1.08); }
.cc-revisit--left { left: 16px; }
.cc-revisit--right { right: 16px; }

/* embeds blocked until consent: keep the empty iframe invisible (works without .cc-root) */
iframe[data-cc-src] { display: none !important; }

/* embeds blocked until consent */
[data-cc-placeholder] {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
  padding: 28px 16px; min-height: 180px; border: 1px dashed rgba(255, 255, 255, 0.3); border-radius: 16px;
  background: rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.8);
}

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .cc-banner--bar { flex-direction: column; align-items: stretch; gap: 14px; left: 8px; right: 8px; bottom: 8px; padding: 16px; }
  .cc-banner--box-left, .cc-banner--box-right { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 16px; max-height: calc(100vh - 16px); overflow-y: auto; }
  .cc-actions { flex-direction: column; }
  .cc-btn { width: 100%; }
  .cc-modal-foot { flex-direction: column; }   /* same order as on desktop: reject, save, accept */
  .cc-overlay { padding: 8px; align-items: flex-end; }
  .cc-modal { max-height: 92vh; }
  .cc-revisit { bottom: 12px; }
  .cc-revisit--left { left: 12px; }
  .cc-revisit--right { right: 12px; }
}

@keyframes cc-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-overlay { animation: none; }
  .cc-slider, .cc-slider::before, .cc-revisit, .cc-btn { transition: none; }
}
