/* JCMC Cookie Consent - front-end styles (banner theming is done via CSS variables injected by jcmc-cc.js). */

:root {
  --jcmc-cc-bg: #ffffff;
  --jcmc-cc-text: #1f2937;
  --jcmc-cc-btn-bg: #1f2937;
  --jcmc-cc-btn-text: #ffffff;
  --jcmc-cc-btn-hover: #374151;
  --jcmc-cc-border: #e5e7eb;
  --jcmc-cc-radius: 8px;
  --jcmc-cc-font: inherit;
}

/* Blocked embeds / pixels never show a broken box. JS removes data-jcmc-src when consent is given. */
iframe[data-jcmc-src],
img[data-jcmc-src] {
  display: none !important;
}

/* Accept and Reject: identical size, weight and style (AEPD). */
#cc-main .cm__btn[data-role="all"],
#cc-main .cm__btn[data-role="necessary"],
#cc-main .pm__btn[data-role="all"],
#cc-main .pm__btn[data-role="necessary"] {
  font-weight: 600;
}

#cc-main .jcmc-cc-logo {
  display: block;
  max-height: 28px;
  max-width: 140px;
  width: auto;
  height: auto;
  margin: 0 0 .6em;
}

/* Consent placeholder that replaces blocked iframes (span-based: valid inside <p>). */
.jcmc-cc-placeholder {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 200px;
  margin: 0 auto 1em;
  padding: 24px 20px;
  text-align: center;
  background: var(--jcmc-cc-bg);
  color: var(--jcmc-cc-text);
  border: 1px solid var(--jcmc-cc-border);
  border-radius: var(--jcmc-cc-radius);
  font-family: var(--jcmc-cc-font);
  font-size: 15px;
  line-height: 1.5;
}

.jcmc-cc-placeholder__text {
  display: block;
  max-width: 46ch;
}

.jcmc-cc-placeholder__btn,
.jcmc-cc-revisit {
  font-family: var(--jcmc-cc-font);
  cursor: pointer;
}

.jcmc-cc-placeholder__btn {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--jcmc-cc-btn-text);
  background: var(--jcmc-cc-btn-bg);
  border: 2px solid var(--jcmc-cc-btn-bg);
  border-radius: var(--jcmc-cc-radius);
}

.jcmc-cc-placeholder__btn:hover {
  background: var(--jcmc-cc-btn-hover);
  border-color: var(--jcmc-cc-btn-hover);
}

.jcmc-cc-placeholder__btn:focus-visible,
.jcmc-cc-revisit:focus-visible {
  outline: 3px solid var(--jcmc-cc-btn-bg);
  outline-offset: 3px;
}

/* Floating "revisit consent" button. */
.jcmc-cc-revisit {
  position: fixed;
  bottom: 16px;
  z-index: 2147482000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: 44px;
  height: 44px;
  padding: 0 11px;
  color: var(--jcmc-cc-btn-text);
  background: var(--jcmc-cc-btn-bg);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: transform .15s ease, background-color .15s ease;
}

.jcmc-cc-revisit[hidden] {
  display: none;
}

.jcmc-cc-revisit--left {
  left: 16px;
}

.jcmc-cc-revisit--right {
  right: 16px;
}

.jcmc-cc-revisit--labeled {
  padding: 0 16px 0 12px;
}

.jcmc-cc-revisit:hover {
  background: var(--jcmc-cc-btn-hover);
  transform: translateY(-1px);
}

.jcmc-cc-revisit svg {
  flex: none;
  display: block;
}

/* Hide the floating button while the banner or preferences are open. */
html.show--consent .jcmc-cc-revisit,
html.show--preferences .jcmc-cc-revisit {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .jcmc-cc-revisit {
    transition: none;
  }

  .jcmc-cc-revisit:hover {
    transform: none;
  }
}

@media print {
  .jcmc-cc-revisit,
  #cc-main {
    display: none !important;
  }
}
