/*
 * CookieYes banner + preference centre in Hartwell's look: Manrope, black/white, the
 * storefront's pill buttons (rounded-full, type-button). Loaded only when consent is on —
 * by app/layout.tsx and, as a deploy-time copy, by the WooCommerce theme (inc/tracking.php).
 * Edit THIS file only. CookieYes writes its dashboard colours as inline styles, hence !important.
 * Set the banner colours in the CookieYes dashboard to the same values as a fallback.
 */
.cky-consent-container,
.cky-modal,
.cky-preference-center,
.cky-consent-container *,
.cky-modal * {
  font-family: var(--font-body, var(--font-manrope, "Manrope")), system-ui, sans-serif !important;
  letter-spacing: 0;
}

.cky-consent-bar,
.cky-preference-center {
  background: #fff !important;
  color: #1a1a1a !important;
  border: 1px solid rgb(26 26 26 / 0.12) !important;
  border-radius: 0 !important;
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.12) !important;
}

.cky-title,
.cky-preference-title {
  color: #1a1a1a !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

.cky-notice-des,
.cky-notice-des p,
.cky-preference-content-wrapper,
.cky-preference-content-wrapper p,
.cky-accordion-header-des,
.cky-accordion-header-des p {
  color: rgb(26 26 26 / 0.7) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.cky-notice-des a,
.cky-preference-content-wrapper a,
.cky-policy {
  color: #1a1a1a !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

.cky-btn {
  border-radius: 9999px !important;
  padding: 12px 24px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  line-height: 1.4 !important;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

/* Primary: «Godta alle» — black pill. */
.cky-btn-accept,
.cky-btn-preferences {
  background: #1a1a1a !important;
  border: 1px solid #1a1a1a !important;
  color: #fff !important;
}
.cky-btn-accept:hover,
.cky-btn-preferences:hover {
  background: rgb(26 26 26 / 0.9) !important;
}

/* Secondary: «Avvis» / «Tilpass» — outlined, as «Les alle anmeldelser». Same weight as accept
   (the choice must be as easy to refuse as to accept). */
.cky-btn-reject,
.cky-btn-customize {
  background: #fff !important;
  border: 1px solid rgb(26 26 26 / 0.3) !important;
  color: #1a1a1a !important;
}
.cky-btn-reject:hover,
.cky-btn-customize:hover {
  border-color: #1a1a1a !important;
}

.cky-btn:focus-visible,
.cky-switch input:focus-visible {
  outline: 2px solid #1a1a1a !important;
  outline-offset: 2px !important;
}

/* Category switches: black when on. */
.cky-switch input[type="checkbox"]:checked {
  background: #1a1a1a !important;
}

/* CookieYes' floating «revisit» badge: the footer has «Cookie-innstillinger» instead. */
.cky-btn-revisit-wrapper {
  display: none !important;
}

/* «Powered by CookieYes» strip in the brand colours. */
.cky-footer-wrapper,
.cky-footer-shadow {
  background: #fff !important;
}

/* ---------------------------------------------------------------------------------------------------------------
 * Mobile (2026-10-03). Cause of the sideways scroll: CookieYes' preference centre has a fixed width of 845 px and,
 * while closed, stays in the layout (only hidden and moved down with a transform). On phones that fixed 845-px box
 * widened the layout viewport to ~850–1000 px, so the page zoomed out, could be dragged sideways, and the banner
 * stretched to that width (CookieYes' own phone rules at 440/576 px never applied). Fixed at the cause — no
 * overflow-x on html/body.
 * ------------------------------------------------------------------------------------------------------------- */

/* Closed preference centre: out of the layout entirely (CookieYes adds .cky-modal-open when it opens). */
.cky-modal:not(.cky-modal-open) {
  display: none !important;
}

/* Never wider than the screen. */
.cky-consent-container,
.cky-consent-bar,
.cky-modal,
.cky-preference-center {
  box-sizing: border-box !important;
  max-width: 100% !important;
}
.cky-modal.cky-modal-open {
  width: min(845px, calc(100vw - 16px)) !important;
}
.cky-preference-center {
  width: 100% !important;
}
.cky-notice-des,
.cky-notice-des *,
.cky-preference-content-wrapper,
.cky-btn {
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  /* Banner: full width at the bottom, at most about half the screen, content scrolls inside; iPhone safe areas. */
  .cky-consent-container {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    max-height: 55vh !important;
    max-height: 55dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .cky-consent-bar {
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }
  .cky-consent-container .cky-consent-bar .cky-notice-content-wrapper {
    padding: 20px max(20px, env(safe-area-inset-right)) 16px max(20px, env(safe-area-inset-left)) !important;
  }
  .cky-custom-brand-logo-wrapper,
  .cky-notice .cky-title,
  .cky-notice-des,
  .cky-notice-btn-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .cky-notice-des {
    max-height: none !important;
    overflow-y: visible !important;
  }

  /* Buttons stacked, full width, text may wrap, a little less tracking. */
  .cky-notice-btn-wrapper,
  .cky-prefrence-btn-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .cky-notice-btn-wrapper .cky-btn,
  .cky-prefrence-btn-wrapper .cky-btn {
    width: 100% !important;
    margin: 0 !important;
    white-space: normal !important;
    letter-spacing: 0.05em !important;
    padding: 12px 16px !important;
  }

  /* Preference centre: the whole screen, safe areas respected, its own scrolling. */
  .cky-modal.cky-modal-open {
    width: 100vw !important;
    max-height: 100% !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }
  .cky-preference-center {
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }
  .cky-preference-header,
  .cky-preference-body-wrapper,
  .cky-footer-wrapper .cky-prefrence-btn-wrapper {
    padding-left: max(16px, env(safe-area-inset-left)) !important;
    padding-right: max(16px, env(safe-area-inset-right)) !important;
  }
  .cky-footer-wrapper {
    padding-bottom: env(safe-area-inset-bottom) !important;
  }
}

/* Readable text on the narrowest phones too (CookieYes drops to 12 px below 352 px). */
.cky-notice-des,
.cky-notice-des *,
.cky-preference-content-wrapper,
.cky-preference-content-wrapper * {
  font-size: 14px !important;
}
@media (max-width: 352px) {
  .cky-btn {
    font-size: 13px !important;
  }
}
