/* Cookie Consent - every rule is scoped to .cc-root so the host page's
   own design is not affected. Colors come from config.php ('style'). */

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

.cc-root,
.cc-root * {
  box-sizing: border-box;
}

.cc-root {
  font-family: var(--cc-font, inherit);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
}

/* ---------- bottom bar ---------- */

.cc-root .cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--cc-z, 2147483000);
  background: var(--cc-bar-bg, #1e2655);
  color: var(--cc-bar-text, #fff);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.28);
  animation: cc-rise 0.3s ease-out;
}

.cc-root .cc-banner-inner {
  display: flex;
  align-items: center;
  gap: 16px 28px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 24px;
}

.cc-root .cc-message {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: inherit;
}

.cc-root .cc-link,
.cc-root .cc-link:visited {
  color: var(--cc-link, #85d4f5);
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  font-weight: 600;
}

.cc-root .cc-link:hover,
.cc-root .cc-link:focus {
  color: var(--cc-bar-text, #fff);
}

.cc-root .cc-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- buttons ---------- */

.cc-root .cc-btn {
  display: inline-block;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: 4px;
  background: none;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.cc-root .cc-btn:focus-visible,
.cc-root .cc-close:focus-visible,
.cc-root .cc-revisit:focus-visible,
.cc-root .cc-switch input:focus-visible + .cc-slider {
  outline: 3px solid var(--cc-link, #85d4f5);
  outline-offset: 2px;
}

.cc-root .cc-btn-solid {
  background: var(--cc-accent, #00a0df);
  border-color: var(--cc-accent, #00a0df);
  color: var(--cc-accent-text, #fff);
}
.cc-root .cc-btn-solid:hover { filter: brightness(1.1); }

/* Reject carries the same visual weight as Accept */
.cc-root .cc-btn-outline {
  border-color: var(--cc-bar-text, #fff);
  color: var(--cc-bar-text, #fff);
}
.cc-root .cc-btn-outline:hover {
  background: var(--cc-bar-text, #fff);
  color: var(--cc-bar-bg, #1e2655);
}

.cc-root .cc-btn-plain {
  color: var(--cc-bar-text, #fff);
  text-decoration: underline;
  padding-left: 8px;
  padding-right: 8px;
}
.cc-root .cc-btn-plain:hover { color: var(--cc-link, #85d4f5); }

.cc-root .cc-btn-outline-dark {
  border-color: var(--cc-panel-text, #1e2655);
  color: var(--cc-panel-text, #1e2655);
}
.cc-root .cc-btn-outline-dark:hover {
  background: var(--cc-panel-text, #1e2655);
  color: var(--cc-panel-bg, #fff);
}

/* ---------- settings panel ---------- */

.cc-root .cc-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--cc-z, 2147483000) + 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 14, 36, 0.6);
}

.cc-root .cc-settings {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 32px);
  background: var(--cc-panel-bg, #fff);
  color: var(--cc-panel-text, #1e2655);
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  outline: none;
}

.cc-root .cc-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(30, 38, 85, 0.15);
}

.cc-root .cc-settings-title {
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
  text-transform: none;
}

.cc-root .cc-close {
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.cc-root .cc-close:hover { background: rgba(30, 38, 85, 0.1); }

.cc-root .cc-settings-body {
  padding: 18px 22px 6px;
  overflow-y: auto;
}

.cc-root .cc-settings-intro,
.cc-root .cc-category-desc {
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: inherit;
  opacity: 0.85;
}

.cc-root .cc-category {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(30, 38, 85, 0.15);
  border-radius: 6px;
  background: rgba(240, 243, 247, 0.7);
}

.cc-root .cc-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.cc-root .cc-category-label {
  font-size: 16px;
  font-weight: 700;
}

.cc-root .cc-always {
  font-size: 13px;
  font-weight: 600;
  color: var(--cc-accent, #00a0df);
  white-space: nowrap;
}

.cc-root .cc-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  margin: 0;
  cursor: pointer;
}

.cc-root .cc-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cc-root .cc-slider {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background: #8b92ab;
  transition: background-color 0.15s;
  pointer-events: none;
}

.cc-root .cc-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.cc-root .cc-switch input:checked + .cc-slider { background: var(--cc-accent, #00a0df); }
.cc-root .cc-switch input:checked + .cc-slider::before { transform: translateX(20px); }

.cc-root .cc-settings-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid rgba(30, 38, 85, 0.15);
}

/* ---------- fixed "Cookie Settings" link ---------- */

.cc-root .cc-revisit {
  position: fixed;
  bottom: 0;
  z-index: var(--cc-z, 2147483000);
  margin: 0;
  padding: 7px 14px;
  border: 0;
  border-radius: 6px 6px 0 0;
  background: var(--cc-bar-bg, #1e2655);
  color: var(--cc-bar-text, #fff);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
}
.cc-root .cc-revisit-left { left: 16px; }
.cc-root .cc-revisit-right { right: 16px; }
.cc-root .cc-revisit:hover { background: var(--cc-accent, #00a0df); color: var(--cc-accent-text, #fff); }

html.cc-settings-open { overflow: hidden; }

@keyframes cc-rise {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (max-width: 900px) {
  .cc-root .cc-banner-inner { flex-direction: column; align-items: stretch; padding: 16px; }
  .cc-root .cc-actions { justify-content: stretch; }
  .cc-root .cc-actions .cc-btn { flex: 1 1 auto; text-align: center; }
  .cc-root .cc-message { font-size: 14px; }
}

@media (max-width: 480px) {
  .cc-root .cc-settings-foot .cc-btn { flex: 1 1 100%; text-align: center; }
  .cc-root .cc-btn { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-root .cc-banner { animation: none; }
  .cc-root * { transition: none !important; }
}

@media print {
  .cc-root { display: none !important; }
}
