/* Cookie Consent RO. Accent color comes from --ccro-color (wp-admin setting). */
.ccro-banner,
.ccro-dialog,
.ccro-floating {
  --ccro-text: #1c2318;
  --ccro-muted: #525a4e;
  --ccro-bg: #ffffff;
  --ccro-line: #dfe5da;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ccro-text);
  box-sizing: border-box;
}
.ccro-banner *,
.ccro-dialog * {
  box-sizing: border-box;
}
.ccro-banner[hidden],
.ccro-floating[hidden] {
  display: none !important;
}

/* Banner: full-width bar or bottom-left card */
.ccro-banner {
  position: fixed;
  z-index: 99999;
  background: var(--ccro-bg);
  box-shadow: 0 -4px 24px rgb(0 0 0 / 0.12);
}
.ccro-bar {
  inset: auto 0 0 0;
  border-top: 1px solid var(--ccro-line);
}
.ccro-box {
  left: 16px;
  bottom: 16px;
  max-width: 420px;
  border: 1px solid var(--ccro-line);
  border-radius: 12px;
}
.ccro-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  max-width: 1152px;
  margin: 0 auto;
  padding: 18px 20px;
}
.ccro-box .ccro-inner {
  display: block;
}
.ccro-text {
  flex: 1 1 420px;
}
.ccro-title {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 16px;
}
.ccro-message,
.ccro-intro {
  margin: 0;
  color: var(--ccro-muted);
}
.ccro-message a,
.ccro-intro a {
  color: var(--ccro-color);
  font-weight: 600;
  text-decoration: underline;
}

/* Buttons: Accept and Reject look the same (equal choice, as EU guidance requires) */
.ccro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ccro-box .ccro-actions {
  margin-top: 14px;
}
.ccro-btn {
  appearance: none;
  border: 2px solid var(--ccro-color);
  background: var(--ccro-color);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.2;
}
.ccro-btn:hover {
  filter: brightness(0.92);
}
.ccro-btn-link {
  background: transparent;
  color: var(--ccro-color);
}
.ccro-btn:focus-visible,
.ccro-close:focus-visible,
.ccro-floating:focus-visible,
.ccro-switch input:focus-visible + .ccro-slider {
  outline: 3px solid var(--ccro-color);
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .ccro-actions .ccro-btn {
    flex: 1 1 auto;
  }
  .ccro-box {
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-width: none;
  }
}

/* Settings dialog */
.ccro-dialog {
  /* Explicit centering: theme CSS resets (e.g. Tailwind preflight) remove the browser's margin:auto on <dialog> */
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(560px, calc(100vw - 24px));
  height: fit-content;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--ccro-bg);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.3);
}
.ccro-dialog::backdrop {
  background: rgb(10 15 8 / 0.55);
}
.ccro-dialog-body {
  padding: 22px;
  margin: 0;
}
.ccro-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ccro-dialog h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}
.ccro-close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: var(--ccro-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.ccro-intro {
  margin: 10px 0 16px;
}
.ccro-categories {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ccro-line);
}
.ccro-category {
  padding: 14px 0;
  border-bottom: 1px solid var(--ccro-line);
}
.ccro-category-desc {
  margin: 6px 0 0 56px;
  font-size: 14px;
  color: var(--ccro-muted);
}
.ccro-category-label small {
  font-weight: 400;
  color: var(--ccro-muted);
}

/* Toggle switch (a real checkbox underneath) */
.ccro-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ccro-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.ccro-slider {
  position: relative;
  flex: 0 0 44px;
  height: 24px;
  border-radius: 999px;
  background: #c4cbc0;
  transition: background 0.15s;
}
.ccro-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.ccro-switch input:checked + .ccro-slider {
  background: var(--ccro-color);
}
.ccro-switch input:checked + .ccro-slider::after {
  transform: translateX(20px);
}
.ccro-switch input:disabled + .ccro-slider {
  opacity: 0.6;
  cursor: not-allowed;
}
.ccro-dialog-actions {
  margin-top: 18px;
  justify-content: flex-end;
}

/* Floating reopen button: a cookie, bottom-left */
.ccro-floating {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 99998;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 8px rgb(0 0 0 / 0.25));
  transition: transform 0.2s ease;
}
.ccro-floating svg {
  display: block;
  width: 56px;
  height: 56px;
}
.ccro-floating:hover {
  transform: rotate(-14deg) scale(1.06);
}
@media (max-width: 600px) {
  .ccro-floating,
  .ccro-floating svg {
    width: 48px;
    height: 48px;
  }
  .ccro-floating {
    left: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ccro-slider,
  .ccro-slider::after,
  .ccro-floating {
    transition: none;
  }
  .ccro-floating:hover {
    transform: none;
  }
}
