/* =================================================================
   Visual Packaging — Cookie Consent (US)
   cookieconsent-us.css v1.0.0

   Adds Accept / Decline / Customize + category toggles on top of
   the site's existing .cookies / .cookies-box / .btn-cookies rules
   already defined in css/style.css (kept as-is: black box, red
   accent #e9262a, white button). Only NEW component classes below.
   ================================================================= */

:root {
  --vp-cc-accent      : #e9262a;
  --vp-cc-accent-dark : #540d0f;
  --vp-cc-border      : rgba(233, 38, 42, 0.30);
  --vp-cc-text        : #d6d6d6;
  --vp-cc-text-strong : #ffffff;
  --vp-cc-toggle-on   : #e9262a;
  --vp-cc-toggle-off  : #333333;
  --vp-cc-radius      : 4px;
}

/* ── Buttons row ─────────────────────────────────────────────── */
.cookies-btns {
  display         : flex;
  flex-wrap       : wrap;
  gap             : 1rem;
  justify-content : flex-end;
  margin-top      : -15px;
  margin-right    : 8px;
  margin-bottom   : 4px;
}

/* ── "Decline" button — white / red outline ───────────────────── */
.btn-cookies-decline {
  background        : #fff !important;
  color             : var(--vp-cc-accent-dark) !important;
  font-weight       : 600 !important;
  border-style      : solid !important;
  border-color      : var(--vp-cc-accent) !important;
  border-width      : 2px !important;
  -webkit-box-shadow: -5px 5px 5px 2px rgba(0,0,0,0.5) !important;
  box-shadow        : -5px 5px 5px 2px rgba(0,0,0,0.5) !important;
}
.btn-cookies-decline:hover {
  background        : var(--vp-cc-accent-dark) !important;
  color             : #fff !important;
  border-color      : var(--vp-cc-accent-dark) !important;
}

/* ── "Customize" button — ghost/outline ───────────────────────── */
.btn-cookies-customize {
  background        : #1a1a1a !important;
  color             : var(--vp-cc-text) !important;
  font-weight       : 600 !important;
  border-style      : solid !important;
  border-color      : #444 !important;
  border-width      : 2px !important;
  -webkit-box-shadow: -5px 5px 5px 2px rgba(0,0,0,0.5) !important;
  box-shadow        : -5px 5px 5px 2px rgba(0,0,0,0.5) !important;
}
.btn-cookies-customize:hover {
  color             : #fff !important;
  border-color      : rgba(255,255,255,0.55) !important;
  background        : rgba(255,255,255,0.08) !important;
}

/* ── Preference panel: category rows ───────────────────────────── */
.vp-cc-cat {
  background    : rgba(255,255,255,0.06);
  border        : 1px solid var(--vp-cc-border);
  border-radius : var(--vp-cc-radius);
  padding       : 0.65rem 0.9rem;
  margin-bottom : 0.55rem;
  text-align    : left;
}
.vp-cc-cat:last-child { margin-bottom : 0.7rem; }

.vp-cc-cat-row {
  display         : flex;
  align-items     : flex-start;
  justify-content : space-between;
  gap             : 1rem;
}

.vp-cc-cat-text { flex : 1; min-width : 0; }

.vp-cc-cat-text strong {
  display       : block;
  font-size     : 1em;
  font-weight   : 600;
  color         : var(--vp-cc-text-strong);
  margin-bottom : 0.2rem;
}

.vp-cc-cat-desc {
  display     : block;
  font-size   : 0.9em;
  color       : var(--vp-cc-text);
  line-height : 1.4;
  margin      : 0;
}

/* ── "Always active" badge ──────────────────────────────────────── */
.vp-cc-badge {
  flex-shrink   : 0;
  font-size     : 0.70em;
  font-weight   : 600;
  color         : #ffb3b4;
  background    : rgba(233,38,42,0.18);
  border        : 1px solid rgba(233,38,42,0.35);
  border-radius : 20px;
  padding       : 0.18rem 0.6rem;
  white-space   : nowrap;
  margin-top    : 0.1rem;
}

/* ── Back link (←) in panel title ─────────────────────────────── */
.vp-cc-back {
  color           : rgba(255,255,255,0.45) !important;
  text-decoration : none !important;
  font-weight     : 400 !important;
  margin-right    : 4px;
}
.vp-cc-back:hover { color : #fff !important; }

/* ── Toggle switch ────────────────────────────────────────────── */
.vp-toggle {
  flex-shrink   : 0;
  cursor        : pointer;
  display       : inline-flex;
  align-items   : center;
  margin-top    : 0.1rem;
  margin-bottom : 0;
  font-weight   : normal;
}

.vp-toggle input[type="checkbox"] {
  position      : absolute;
  opacity       : 0;
  width         : 0;
  height        : 0;
  pointer-events: none;
}

.vp-toggle-track {
  display       : flex;
  align-items   : center;
  width         : 44px;
  height        : 24px;
  border-radius : 12px;
  background    : var(--vp-cc-toggle-off);
  border        : 1px solid rgba(255,255,255,0.10);
  transition    : background 0.2s;
  padding       : 2px;
  box-sizing    : border-box;
}

.vp-toggle input[type="checkbox"]:checked + .vp-toggle-track {
  background    : var(--vp-cc-toggle-on);
  border-color  : transparent;
}

.vp-toggle-thumb {
  width         : 18px;
  height        : 18px;
  border-radius : 50%;
  background    : #fff;
  box-shadow    : 0 1px 3px rgba(0,0,0,0.35);
  transition    : transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink   : 0;
}

.vp-toggle input[type="checkbox"]:checked + .vp-toggle-track .vp-toggle-thumb {
  transform     : translateX(20px);
}

/* ── "Manage cookie preferences" footer link ──────────────────── */
.vp-manage-link {
  display         : inline-block;
  font-size       : 11px;
  color           : rgba(255,255,255,0.55) !important;
  text-decoration : underline !important;
  cursor          : pointer;
  margin          : 6px 0 0;
  transition      : color 0.15s;
}
.vp-manage-link:hover { color : #fff !important; }
.vp-manage-link-wrap  { text-align : center; padding: 6px 0; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .cookies-btns { justify-content : center; }
}

@media (prefers-reduced-motion: reduce) {
  .vp-toggle-thumb,
  .vp-toggle-track { transition : none; }
}
