/* =====================================================================
   POCKY - COOKIE CONSENT
   Banner specs from XD "Cookies Consent Bar":
     Desktop : 1440 x 107, #B59648 @ 80%, text 16/24 (title bold 24),
               "Accept All" outline 189 x 40, "Manage Cookies" underlined
     Mobile  : 750 x 220 artboard, centered text 24/30, button 221 x 50
   Mobile sizes use var(--m) (1px of the 750px artboard), defined in
   pocky-css.css. The fallback below keeps this file working on its own.
   ===================================================================== */
:root {
  --cc-m: var(--m, calc(min(100vw, 600px) / 750));
  --cc-gold: #B59648;
  --cc-gold-hover: #9A803D;   /* #B59648 + black 15% (XD button spec) */
  --cc-gold-soft: #E6DBBF;
  --cc-maroon: #361019;
  --cc-brown: #4B3600;
  --cc-cream: #FFFBEF;
}

/* ---------------- BANNER ---------------- */
.cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background-color: rgba(181, 150, 72, 0.8);
  /* keeps the 80% look from XD but blurs the hero text behind the banner */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cc-banner.is-visible {
  transform: translateY(0);
}

/* Mobile: centered, stacked (750 x 220 artboard) */
.cc-banner__inner {
  max-width: 600px;
  margin: 0 auto;
  padding:
    calc(33 * var(--cc-m))
    calc(15 * var(--cc-m))
    calc(25 * var(--cc-m) + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.cc-banner__text {
  margin: 0;
  color: #FFFFFF;
  font-size: max(11px, calc(24 * var(--cc-m)));
  line-height: 1.25;
}

.cc-banner__title {
  display: block;
  font-weight: 700;
}

.cc-br-mobile {
  display: inline;
}

.cc-banner__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(29 * var(--cc-m));
  margin-top: calc(22 * var(--cc-m));
}

.cc-banner .cc-btn--outline {
  width: calc(221 * var(--cc-m));
  min-width: 104px;
  height: calc(50 * var(--cc-m));
  min-height: 28px;
  font-size: max(11px, calc(24 * var(--cc-m)));
}

.cc-link {
  padding: 4px 0;
  background: none;
  border: 0;
  color: #FFFFFF;
  font-family: inherit;
  font-size: max(11px, calc(24 * var(--cc-m)));
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cc-link:hover {
  text-decoration-thickness: 2px;
}

/* Desktop: one row (1440 x 107) */
@media (min-width: 640px) {
  .cc-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(32 * var(--u));
    max-width: none;
    min-height: calc(107 * var(--u));
    padding:
      calc(20 * var(--u))
      max(calc(24 * var(--u)), calc(50% - 587 * var(--u)), env(safe-area-inset-right, 0px))
      calc(20 * var(--u) + env(safe-area-inset-bottom, 0px))
      max(calc(24 * var(--u)), calc(50% - 587 * var(--u)), env(safe-area-inset-left, 0px));
    text-align: left;
  }

  .cc-banner__text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: max(11px, calc(16 * var(--u)));
    line-height: 1.5;
  }

  .cc-banner__title {
    font-size: max(11px, calc(24 * var(--u)));
    line-height: 1;
  }

  .cc-br-mobile {
    display: none;
  }

  .cc-banner__actions {
    flex: 0 0 auto;
    gap: calc(29 * var(--u));
    margin-top: 0;
  }

  .cc-banner .cc-btn--outline {
    width: calc(189 * var(--u));
    height: calc(40 * var(--u));
    font-size: max(11px, calc(16 * var(--u)));
  }

  .cc-link {
    font-size: max(11px, calc(16 * var(--u)));
  }
}

/* ---------------- BUTTONS ---------------- */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* White outline - on the gold banner */
.cc-btn--outline {
  padding: 0;
  background: transparent;
  border: 1px solid #FFFFFF;
  color: #FFFFFF;
}

.cc-btn--outline:hover {
  background: #FFFFFF;
  color: var(--cc-gold-hover);
}

/* Solid gold - primary action in the modal */
.cc-btn--gold {
  background: var(--cc-gold);
  border: 1px solid var(--cc-gold);
  color: #FFFFFF;
}

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

/* Gold outline - Reject all / Accept all (equal weight on purpose) */
.cc-btn--line {
  background: transparent;
  border: 1px solid var(--cc-gold);
  color: var(--cc-brown);
}

.cc-btn--line:hover {
  background: var(--cc-gold);
  color: #FFFFFF;
}

.cc-banner :focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 3px;
}

.cc-modal :focus-visible {
  outline: 2px solid var(--cc-maroon);
  outline-offset: 3px;
}

/* ---------------- PREFERENCES MODAL ---------------- */
html.cc-lock,
html.cc-lock body {
  overflow: hidden;
}

.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.cc-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(54, 16, 25, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cc-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 28px 22px 22px;
  background: var(--cc-cream);
  border: 1px solid var(--cc-gold);
  border-radius: 17px;
  color: var(--cc-brown);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cc-modal__dialog:focus {
  outline: none;
}

.cc-modal.is-open .cc-modal__overlay,
.cc-modal.is-open .cc-modal__dialog {
  opacity: 1;
  transform: none;
}

.cc-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cc-brown);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.cc-modal__close:hover {
  background: var(--cc-gold-soft);
}

.cc-modal__title {
  margin: 0 40px 10px 0;
  color: var(--cc-maroon);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.cc-modal__intro {
  margin: 0 0 18px;
  color: var(--cc-brown);
  font-size: 14px;
  line-height: 1.5;
}

.cc-modal__intro a {
  color: var(--cc-maroon);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Categories */
.cc-cats {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(181, 150, 72, 0.4);
}

.cc-cat {
  padding: 16px 0;
  border-bottom: 1px solid rgba(181, 150, 72, 0.4);
}

.cc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cc-cat__name {
  color: var(--cc-brown);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

span.cc-cat__name {
  cursor: default;
}

.cc-cat__always {
  flex-shrink: 0;
  color: var(--cc-gold-hover);
  font-size: 13px;
  font-weight: 600;
}

.cc-cat__desc {
  margin: 6px 0 0;
  padding-right: 60px;
  color: var(--cc-brown);
  font-size: 13px;
  line-height: 1.5;
}

/* Toggle switch */
.cc-switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
}

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

.cc-switch__track {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: #D8CCAE;
  transition: background-color 0.2s ease;
}

.cc-switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.cc-switch input:checked + .cc-switch__track {
  background: var(--cc-gold);
}

.cc-switch input:checked + .cc-switch__track::after {
  transform: translateX(20px);
}

.cc-switch input:focus-visible + .cc-switch__track {
  outline: 2px solid var(--cc-maroon);
  outline-offset: 2px;
}

/* Modal buttons: stacked on mobile, one row on larger screens */
.cc-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.cc-modal__actions .cc-btn {
  height: 44px;
  font-size: 15px;
  font-weight: 600;
}

@media (min-width: 600px) {
  .cc-modal__dialog {
    padding: 36px 36px 30px;
  }

  .cc-modal__title {
    font-size: 24px;
  }

  .cc-modal__intro {
    font-size: 15px;
  }

  .cc-cat__desc {
    font-size: 14px;
  }

  .cc-modal__actions {
    flex-direction: row;
  }

  .cc-modal__actions .cc-btn {
    flex: 1 1 0;
    padding: 0 12px;
  }
}

/* Footer "Cookie settings" link */
.cc-footer-link {
  margin-left: 12px;
  padding: 0;
  background: none;
  border: 0;
  color: #FFFFFF;
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.cc-footer-link:hover {
  color: #D1BC76;
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner,
  .cc-modal__overlay,
  .cc-modal__dialog {
    transition: none;
  }
}

/* Let the footer grow if the copyright + link wrap on small phones */
.section-copyright {
  height: auto;
  min-height: 41px;
  padding: 10px 16px;
}
