/* ==========================================================================
   Cookie lišta (68publishers cookie-consent, spúšťa ju GTM) v Reico dizajne.
   Enqueued by mu-plugins/ingriddedkova-gtm.php.

   The widget injects its own stylesheet later than this file and sets its
   tokens on :root, so ours live on #cc--main (higher specificity, inherited
   by the whole widget). Its reset `.cc_div * { border: none; background:
   none }` is beaten by the #cc--main prefix as well.
   ========================================================================== */

#cc--main {
  --cc-font-family: Poppins, system-ui, sans-serif;
  --cc-font-size: 16px;
  --cc-bg: var(--white, #fff);
  --cc-text: var(--primary);
  --cc-block-text: var(--primary);
  --cc-border-radius: 1rem;
  --cc-btn-border-radius: 999px;

  /* Primary action = Crystal Red, same as the site CTA (btn--secondary). */
  --cc-btn-primary-bg: var(--secondary);
  --cc-btn-primary-text: var(--primary);
  --cc-btn-primary-hover-bg: var(--secondary-hover);
  --cc-btn-primary-hover-text: var(--primary);

  /* Other actions = Algae outline, filled on hover. */
  --cc-btn-secondary-bg: transparent;
  --cc-btn-secondary-text: var(--primary);
  --cc-btn-secondary-hover-bg: var(--primary);
  --cc-btn-secondary-hover-text: var(--white, #fff);

  --cc-toggle-bg-off: color-mix(in oklch, var(--primary) 40%, white);
  --cc-toggle-bg-on: var(--primary);
  --cc-toggle-bg-readonly: color-mix(in oklch, var(--primary) 55%, white);
  --cc-toggle-knob-bg: var(--white, #fff);
  --cc-toggle-knob-icon-color: var(--primary);

  /* Categories in the settings modal on Lime. */
  --cc-cookie-category-block-bg: var(--base);
  --cc-cookie-category-block-bg-hover: color-mix(in oklch, var(--base) 85%, var(--primary));
  --cc-section-border: color-mix(in oklch, var(--primary) 12%, white);
  --cc-cookie-table-border: color-mix(in oklch, var(--primary) 12%, white);

  --cc-overlay-bg: var(--primary);
  --cc-overlay-opacity: 0.55;
  --cc-consent-modal-box-shadow: 0 1rem 2.5rem color-mix(in oklch, var(--primary) 28%, transparent);
  --cc-webkit-scrollbar-bg: color-mix(in oklch, var(--primary) 25%, white);
  --cc-webkit-scrollbar-bg-hover: color-mix(in oklch, var(--primary) 45%, white);
}

/* --- Headings ------------------------------------------------------------ */
#cc--main #c-ttl,
#cc--main #s-ttl {
  font-weight: 700;
  color: var(--primary);
}

#cc--main #c-ttl {
  font-size: 1.15em;
}

#cc--main #c-txt {
  font-size: 0.9em;
  line-height: 1.6;
}

/* --- Buttons: pill like the site buttons --------------------------------- */
#cc--main .c-bn {
  font-weight: 500;
  font-size: 0.875em;
  padding: 0.75em 1.5em;
  box-shadow: inset 0 0 0 1px var(--primary);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Primary (first button) has no outline, Crystal Red fill is enough. */
#cc--main #c-bns button:first-child,
#cc--main #s-bns button:first-child {
  box-shadow: inset 0 0 0 1px var(--secondary);
}

#cc--main #c-bns button:first-child:hover,
#cc--main #s-bns button:first-child:hover {
  box-shadow: inset 0 0 0 1px var(--secondary-hover);
}

/* Third button ("Povolit nezbytné") and the settings buttons share the outline style. */
#cc--main #c-bns #c-t-bn,
#cc--main #s-bns button + button {
  background: var(--cc-btn-secondary-bg);
  color: var(--cc-btn-secondary-text);
}

#cc--main #c-bns #c-t-bn:hover,
#cc--main #s-bns button + button:hover {
  background: var(--cc-btn-secondary-hover-bg);
  color: var(--cc-btn-secondary-hover-text);
}

/* Close (×) in the settings modal: plain icon, no outline. */
#cc--main #s-c-bn {
  box-shadow: none;
  border-radius: 50%;
  background: transparent;
}

#cc--main #s-c-bn:hover {
  background: var(--base);
}

#cc--main #s-c-bn::before,
#cc--main #s-c-bn::after {
  background: var(--primary);
}

/* --- Links: Algae with Crystal Red underline, like body links ------------ */
#cc--main .cc-link {
  color: var(--primary);
  border-bottom: 2px solid var(--secondary);
  font-weight: 500;
}

#cc--main .cc-link:hover {
  border-color: var(--primary);
}

/* --- Settings modal ------------------------------------------------------ */
/* Category titles are <button>s, ACSS centres button text. */
#cc--main #s-cnt .b-bn .b-tl {
  font-weight: 600;
  text-align: start;
}

#cc--main #s-bl .b-bn .b-tl.exp::before,
#cc--main .cc_div .act .b-bn .b-tl::before {
  border-color: var(--primary);
}

/* --- Keyboard focus ------------------------------------------------------ */
#cc--main :is(button, a, input, .b-tl):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

#cc--main .b-tg .c-tgl:focus-visible ~ .c-tg {
  box-shadow: var(--brand-focus-ring, 0 0 0 3px var(--secondary));
}
