/* ==========================================================================
   Nuthurst Grange — CookieYes Consent & Preferences Redesign
   Palette: Warm Ivory (#F8F7F3), White (#FFFFFF), Espresso (#171613),
            Charcoal (#4E4C46), Border (#DED8CF), Restrained Gold (#A48660)
   Typography: Cormorant Garamond / Playfair Display + Inter
   Preserves all CookieYes consent logic, logs, and script-blocking controls.
   ========================================================================== */

/* 1. Permanently remove floating cookie revisit icon after consent
      (DOM node remains present for native .cky-banner-element / Cookie Settings links) */
.cky-btn-revisit-wrapper,
.cky-revisit-bottom-left,
.cky-revisit-bottom-right {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* 2. Compact, Elegant Consent Panel */
.cky-consent-container {
  position: fixed !important;
  left: 20px !important;
  right: auto !important;
  bottom: 20px !important;
  width: min(430px, calc(100vw - 40px)) !important;
  max-width: 430px !important;
  z-index: 99985 !important;
  box-sizing: border-box !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.cky-consent-container.cky-hide {
  display: none !important;
}

.cky-consent-container .cky-consent-bar {
  background: #F8F7F3 !important;
  border: 1px solid #DED8CF !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 52px rgba(23, 22, 19, 0.16) !important;
  padding: 18px 20px !important;
  color: #171613 !important;
}

.cky-consent-container .cky-notice {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.cky-consent-container .cky-title {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif !important;
  font-size: 22px !important;
  font-weight: 500 !important;
  line-height: 1.18 !important;
  letter-spacing: -0.01em !important;
  color: #171613 !important;
  margin: 0 0 8px !important;
}

.cky-consent-container .cky-notice-group {
  display: block !important;
}

.cky-consent-container .cky-notice-des,
.cky-consent-container .cky-notice-des p {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.52 !important;
  color: #4E4C46 !important;
  margin: 0 !important;
}

.cky-consent-container .cky-notice-des a,
.cky-consent-container .cky-policy {
  color: #8E6E2E !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

/* Equally prominent Accept All & Reject Optional buttons + discreet Customise pill */
.cky-consent-container .cky-notice-btn-wrapper {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 8px !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.cky-consent-container .cky-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  letter-spacing: 0.01em !important;
  cursor: pointer !important;
  text-align: center !important;
  white-space: nowrap !important;
  transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease !important;
}

.cky-consent-container .cky-btn-accept {
  order: 1 !important;
  height: 42px !important;
  background: #171613 !important;
  color: #F8F7F3 !important;
  border: 1.5px solid #171613 !important;
}

.cky-consent-container .cky-btn-accept:hover {
  background: #2C2A24 !important;
  border-color: #2C2A24 !important;
  color: #FFFFFF !important;
}

.cky-consent-container .cky-btn-reject {
  order: 2 !important;
  height: 42px !important;
  background: #FFFFFF !important;
  color: #171613 !important;
  border: 1.5px solid #171613 !important;
}

.cky-consent-container .cky-btn-reject:hover {
  background: #171613 !important;
  color: #F8F7F3 !important;
}

.cky-consent-container .cky-btn-customize {
  order: 3 !important;
  grid-column: 1 / -1 !important;
  height: 36px !important;
  background: transparent !important;
  color: #5A564E !important;
  border: 1px solid #DED8CF !important;
  font-size: 12.5px !important;
}

.cky-consent-container .cky-btn-customize:hover {
  border-color: #A48660 !important;
  color: #171613 !important;
  background: #FFFFFF !important;
}

@media (max-width: 767px) {
  .cky-consent-container {
    left: 12px !important;
    right: 12px !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: none !important;
  }
  .cky-consent-container .cky-consent-bar {
    padding: 15px 16px !important;
    border-radius: 16px !important;
  }
  .cky-consent-container .cky-title {
    font-size: 20px !important;
    margin-bottom: 6px !important;
  }
  .cky-consent-container .cky-notice-des,
  .cky-consent-container .cky-notice-des p {
    font-size: 12.5px !important;
  }
  .cky-consent-container .cky-btn-accept,
  .cky-consent-container .cky-btn-reject {
    height: 40px !important;
    font-size: 12.5px !important;
    padding: 0 10px !important;
  }
}

/* 3. Restyled CookieYes Preferences Modal (Shared Across WordPress & Static Microsites) */
.cky-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(18, 17, 15, 0.48) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  z-index: 1000008 !important;
}

.cky-overlay.cky-hide {
  display: none !important;
}

.cky-modal {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  transform: none !important;
  -webkit-transform: none !important;
  display: none !important;
  visibility: hidden !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  z-index: 1000010 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.cky-modal.cky-modal-open {
  display: flex !important;
  visibility: visible !important;
  transform: none !important;
  -webkit-transform: none !important;
}

.cky-preference-center {
  background: #F8F7F3 !important;
  border: 1px solid #DED8CF !important;
  border-radius: 22px !important;
  box-shadow: 0 24px 60px rgba(18, 17, 15, 0.24) !important;
  color: #171613 !important;
  overflow: hidden !important;
  width: 100% !important;
  max-width: 560px !important;
  max-height: 86vh !important;
  display: flex !important;
  flex-direction: column !important;
}

.cky-preference-header {
  background: #F8F7F3 !important;
  border-bottom: 1px solid #DED8CF !important;
  padding: 18px 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.cky-preference-title {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif !important;
  font-size: 26px !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  color: #171613 !important;
}

.cky-preference-header .cky-btn-close {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: 1px solid #DED8CF !important;
  background: #FFFFFF !important;
  color: #171613 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: border-color 200ms ease !important;
}

.cky-preference-header .cky-btn-close:hover {
  border-color: #171613 !important;
}

.cky-preference-header .cky-btn-close img {
  width: 12px !important;
  height: 12px !important;
  filter: brightness(0.15) !important;
}

.cky-preference-body-wrapper {
  padding: 16px 22px !important;
  background: #F8F7F3 !important;
  overflow-y: auto !important;
  flex: 1 1 auto !important;
}

.cky-preference-content-wrapper,
.cky-preference-content-wrapper p {
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: #4E4C46 !important;
  margin: 0 !important;
}

.cky-show-desc-btn {
  color: #8E6E2E !important;
  font-weight: 500 !important;
  font-size: 12.5px !important;
}

.cky-accordion-wrapper {
  border-top: 1px solid #DED8CF !important;
  padding-top: 12px !important;
  margin-top: 12px !important;
}

.cky-accordion {
  background: #FFFFFF !important;
  border: 1px solid #DED8CF !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  margin-bottom: 8px !important;
}

.cky-accordion-item {
  border: 0 !important;
  padding: 0 !important;
}

.cky-accordion-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.cky-accordion-btn {
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #171613 !important;
  cursor: pointer !important;
}

.cky-accordion-header-des,
.cky-accordion-header-des p {
  font-family: 'Inter', sans-serif !important;
  font-size: 12.5px !important;
  line-height: 1.48 !important;
  color: #5A564E !important;
  margin: 4px 0 0 !important;
}

.cky-always-active {
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #8E6E2E !important;
  white-space: nowrap !important;
}

.cky-switch {
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.cky-switch.cky-hide,
.cky-modal .cky-hide,
#ckyDetailCategorynecessary .cky-switch {
  display: none !important;
}

.cky-switch input[type="checkbox"] {
  position: relative !important;
  width: 44px !important;
  height: 24px !important;
  margin: 0 !important;
  background: #CFC9BE !important;
  border-radius: 999px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  border: 0 !important;
  cursor: pointer !important;
  transition: background-color 200ms ease !important;
}

.cky-switch input[type="checkbox"]::before {
  content: "" !important;
  position: absolute !important;
  top: 3px !important;
  left: 3px !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: #FFFFFF !important;
  box-shadow: 0 1px 4px rgba(23, 22, 19, 0.25) !important;
  transition: transform 200ms ease !important;
}

.cky-switch input:checked[type="checkbox"] {
  background: #A48660 !important;
}

.cky-switch input:checked[type="checkbox"]::before {
  transform: translateX(20px) !important;
}

.cky-audit-table {
  background: #F8F7F3 !important;
  border: 1px solid #DED8CF !important;
  border-radius: 8px !important;
}

.cky-footer-shadow {
  background: linear-gradient(180deg, rgba(248, 247, 243, 0) 0%, #F8F7F3 100%) !important;
}

.cky-footer-wrapper {
  background: #F8F7F3 !important;
  border-top: 1px solid #DED8CF !important;
  padding: 14px 22px 18px !important;
}

.cky-prefrence-btn-wrapper {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  padding: 0 !important;
  border-top: 0 !important;
}

.cky-prefrence-btn-wrapper .cky-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 42px !important;
  padding: 0 12px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 220ms ease !important;
}

.cky-prefrence-btn-wrapper .cky-btn-reject {
  background: #FFFFFF !important;
  color: #171613 !important;
  border: 1.5px solid #171613 !important;
}

.cky-prefrence-btn-wrapper .cky-btn-reject:hover {
  background: #171613 !important;
  color: #F8F7F3 !important;
}

.cky-prefrence-btn-wrapper .cky-btn-preferences {
  background: #FFFFFF !important;
  color: #171613 !important;
  border: 1.5px solid #A48660 !important;
}

.cky-prefrence-btn-wrapper .cky-btn-preferences:hover {
  background: #A48660 !important;
  color: #FFFFFF !important;
}

.cky-prefrence-btn-wrapper .cky-btn-accept {
  background: #171613 !important;
  color: #F8F7F3 !important;
  border: 1.5px solid #171613 !important;
}

.cky-prefrence-btn-wrapper .cky-btn-accept:hover {
  background: #2C2A24 !important;
  color: #FFFFFF !important;
}

@media (max-width: 575px) {
  .cky-preference-center {
    border-radius: 18px !important;
    max-width: calc(100vw - 20px) !important;
  }
  .cky-preference-header {
    padding: 15px 16px !important;
  }
  .cky-preference-body-wrapper {
    padding: 14px 16px !important;
  }
  .cky-footer-wrapper {
    padding: 12px 16px 16px !important;
  }
  .cky-prefrence-btn-wrapper {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
  .cky-prefrence-btn-wrapper .cky-btn-preferences {
    grid-column: 1 / -1 !important;
    order: 3 !important;
  }
  .cky-prefrence-btn-wrapper .cky-btn-accept {
    order: 1 !important;
  }
  .cky-prefrence-btn-wrapper .cky-btn-reject {
    order: 2 !important;
  }
}

.cky-consent-container button:focus-visible,
.cky-modal button:focus-visible,
.cky-modal a:focus-visible,
.cky-modal input:focus-visible {
  outline: 2px solid #A48660 !important;
  outline-offset: 2px !important;
}
