/* ==========================================================================
   Newland Bamboo — Cookie Card 1 + Persistent Trigger D (Design System Final)
   Scoped strictly to Pressidium Cookie Consent (#cc--main) & #nl-cookie-trigger.
   Uses Newland Bamboo tokens: #024440 / #0B2F28 / #8FE0C4 / #EDF6F2 / #DCE4E1.
   Zero blurry card shadows; official 5px offset-shadow buttons; 16px/22px/8px radii.
   ========================================================================== */

/* ---------- Card 1: Crisp White Bottom-Left Card (2px #024440 Hard Frame) ---------- */
body.pressidium-cc-theme #cc--main {
  --cc-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  --cc-bg: #FFFFFF;
  --cc-text: #17211E;
  --cc-block-text: #42504A;
  --cc-border-radius: 16px;
  --cc-btn-border-radius: 8px;
  --cc-section-border: #DCE4E1;
  --cc-overlay-bg: #0B2F28;
  --cc-overlay-opacity: 0.7;
  --cc-consent-modal-box-shadow: none;
  --cc-toggle-bg-off: #CBD5D1;
  --cc-toggle-bg-on: #024440;
  --cc-toggle-bg-readonly: #8FE0C4;
  --cc-toggle-knob-bg: #FFFFFF;
  --cc-cookie-category-block-bg: #F7F9F8;
  --cc-cookie-category-block-bg-hover: #EDF6F2;
  --cc-cookie-table-border: #DCE4E1;
}

body.pressidium-cc-theme #cc--main #cm.box.bottom.left {
  left: 24px;
  right: auto;
  bottom: 24px;
  width: min(424px, calc(100vw - 48px));
  max-width: 424px;
  padding: 20px 22px 24px;
  background: #FFFFFF;
  color: #17211E;
  border: 2px solid #024440;
  border-radius: 16px;
  box-shadow: none;
}

html[dir="rtl"] body.pressidium-cc-theme #cc--main #cm.box.bottom.left {
  left: auto;
  right: 24px;
}

body.pressidium-cc-theme #cc--main #c-ttl {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: #17211E;
}

body.pressidium-cc-theme #cc--main #c-txt {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #42504A;
}

/* Separated utility links row (never glued together) */
body.pressidium-cc-theme #cc--main #c-txt .nl-cc-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #DCE4E1;
}

body.pressidium-cc-theme #cc--main #c-txt .nl-cc-sep {
  color: #B9C8C2;
  user-select: none;
}

body.pressidium-cc-theme #cc--main #c-txt a.nlb-cookie-policy,
body.pressidium-cc-theme #cc--main #c-txt button.nlb-cookie-manage {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #006B60;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  cursor: pointer;
  transition: color 180ms ease;
}

/* Fallback separation if JS has not wrapped the two links yet */
body.pressidium-cc-theme #cc--main #c-txt > a.nlb-cookie-policy {
  margin-top: 10px;
  margin-inline-end: 14px;
}

body.pressidium-cc-theme #cc--main #c-txt a.nlb-cookie-policy:hover,
body.pressidium-cc-theme #cc--main #c-txt button.nlb-cookie-manage:hover {
  background: transparent;
  color: #0B2F28;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  border: 0;
}

body.pressidium-cc-theme #cc--main #c-txt a.nlb-cookie-policy:focus-visible,
body.pressidium-cc-theme #cc--main #c-txt button.nlb-cookie-manage:focus-visible {
  outline: 2px solid #024440;
  outline-offset: 3px;
}

/* Official Dual Offset-Shadow Buttons inside Card 1 */
body.pressidium-cc-theme #cc--main #c-bns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  margin-top: 16px;
  padding: 0 5px 5px 0;
}

body.pressidium-cc-theme #cc--main #c-bns .c-bn {
  float: none;
  flex: 1 1 156px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  overflow: visible;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease !important;
}

body.pressidium-cc-theme #cc--main #c-bns #c-p-bn {
  background: #024440;
  color: #FFFFFF;
  border: 1px solid #024440;
  box-shadow: 5px 5px 0 #8FE0C4;
}

body.pressidium-cc-theme #cc--main #c-bns #c-p-bn:hover {
  background: #024440;
  color: #FFFFFF;
  border: 1px solid #024440;
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 #8FE0C4;
}

body.pressidium-cc-theme #cc--main #c-bns #c-p-bn:active {
  background: #024440;
  color: #FFFFFF;
  border: 1px solid #024440;
  transform: translate(5px, 5px);
  box-shadow: none;
}

body.pressidium-cc-theme #cc--main #c-bns #c-s-bn {
  background: #FFFFFF;
  color: #024440;
  border: 1px solid #024440;
  box-shadow: 5px 5px 0 #024440;
}

body.pressidium-cc-theme #cc--main #c-bns #c-s-bn:hover {
  background: #FFFFFF;
  color: #024440;
  border: 1px solid #024440;
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 #024440;
}

body.pressidium-cc-theme #cc--main #c-bns #c-s-bn:active {
  background: #EDF6F2;
  color: #024440;
  border: 1px solid #024440;
  transform: translate(5px, 5px);
  box-shadow: none;
}

body.pressidium-cc-theme #cc--main #c-bns .c-bn:focus-visible {
  outline: 2px solid #0B2F28;
  outline-offset: 7px;
}

/* ---------- Preferences Settings Modal (Design System Section 14: 22px Radius) ---------- */
body.pressidium-cc-theme #cc--main #s-inr {
  border: 1px solid #DCE4E1;
  border-radius: 22px;
  box-shadow: none;
  background: #FFFFFF;
  padding-top: 72px;
  padding-bottom: 84px;
}

body.pressidium-cc-theme #cc--main #s-hdr {
  height: 72px;
  padding: 0 24px;
  border-bottom: 1px solid #DCE4E1;
  background: #FFFFFF;
}

body.pressidium-cc-theme #cc--main #s-ttl {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #17211E;
}

body.pressidium-cc-theme #cc--main #s-c-bn {
  width: 38px;
  height: 38px;
  border: 1px solid #DCE4E1;
  border-radius: 8px;
  background: #FFFFFF;
}

body.pressidium-cc-theme #cc--main #s-c-bn:hover {
  border: 1px solid #024440;
  background: #EDF6F2;
}

body.pressidium-cc-theme #cc--main #s-bl {
  padding: 18px 24px;
}

body.pressidium-cc-theme #cc--main #s-bl .c-bl {
  border: 1px solid #DCE4E1;
  border-radius: 12px;
  margin-bottom: 10px;
}

body.pressidium-cc-theme #cc--main #s-bl .c-bl:first-child {
  border: 0;
  margin-bottom: 14px;
}

body.pressidium-cc-theme #cc--main #s-bns {
  height: 84px;
  padding: 16px 24px 20px;
  background: #F7F9F8;
  border-top: 1px solid #DCE4E1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

body.pressidium-cc-theme #cc--main #s-bns .c-bn {
  float: none;
  flex: 0 1 auto;
  min-height: 44px;
  margin: 0;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  overflow: visible;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease !important;
}

body.pressidium-cc-theme #cc--main #s-bns #s-sv-bn {
  background: #024440;
  color: #FFFFFF;
  border: 1px solid #024440;
  box-shadow: 5px 5px 0 #8FE0C4;
}

body.pressidium-cc-theme #cc--main #s-bns #s-sv-bn:hover {
  background: #024440;
  color: #FFFFFF;
  border: 1px solid #024440;
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 #8FE0C4;
}

body.pressidium-cc-theme #cc--main #s-bns #s-sv-bn:active {
  transform: translate(5px, 5px);
  box-shadow: none;
}

body.pressidium-cc-theme #cc--main #s-bns #s-all-bn,
body.pressidium-cc-theme #cc--main #s-bns #s-rall-bn {
  background: #FFFFFF;
  color: #024440;
  border: 1px solid #024440;
  box-shadow: none;
}

body.pressidium-cc-theme #cc--main #s-bns #s-rall-bn {
  border-color: #DCE4E1;
  color: #42504A;
}

body.pressidium-cc-theme #cc--main #s-bns #s-all-bn:hover,
body.pressidium-cc-theme #cc--main #s-bns #s-rall-bn:hover {
  background: #EDF6F2;
  border: 1px solid #024440;
  color: #024440;
}

/* ---------- Persistent Trigger D (Deep Bamboo Square -> Expands Label on Hover) ---------- */
#nl-cookie-trigger.nl-cookie-trig {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 9998;
  height: 44px;
  min-width: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: #0B2F28;
  color: #FFFFFF;
  border: 1px solid #8FE0C4;
  border-radius: 8px;
  box-shadow: 4px 4px 0 #8FE0C4;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, gap 200ms ease, padding 200ms ease, opacity 200ms ease;
}

html[dir="rtl"] #nl-cookie-trigger.nl-cookie-trig {
  left: auto;
  right: 24px;
}

#nl-cookie-trigger.nl-cookie-trig[hidden] {
  display: none !important;
}

#nl-cookie-trigger.nl-cookie-trig svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: block;
}

#nl-cookie-trigger.nl-cookie-trig .nl-ct-label {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 220ms ease, opacity 180ms ease;
}

@media (hover: hover) {
  #nl-cookie-trigger.nl-cookie-trig:hover,
  #nl-cookie-trigger.nl-cookie-trig:focus-visible {
    gap: 8px;
    padding: 0 15px 0 12px;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #8FE0C4;
  }

  #nl-cookie-trigger.nl-cookie-trig:hover .nl-ct-label,
  #nl-cookie-trigger.nl-cookie-trig:focus-visible .nl-ct-label {
    max-width: 190px;
    opacity: 1;
  }
}

#nl-cookie-trigger.nl-cookie-trig:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

#nl-cookie-trigger.nl-cookie-trig:focus-visible {
  outline: 2px solid #024440;
  outline-offset: 6px;
}

/* ---------- Mobile Refinements ---------- */
@media screen and (max-width: 688px) {
  body.pressidium-cc-theme #cc--main #cm.box.bottom.left {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
    padding: 16px 16px 20px !important;
  }

  body.pressidium-cc-theme #cc--main #c-bns {
    flex-direction: column;
    gap: 12px;
    padding: 0 5px 5px 0;
  }

  body.pressidium-cc-theme #cc--main #c-bns .c-bn {
    width: 100%;
    flex: none;
    margin-top: 0;
  }

  body.pressidium-cc-theme #cc--main #s-inr {
    border-radius: 22px 22px 0 0;
    padding-bottom: 184px;
  }

  body.pressidium-cc-theme #cc--main #s-bns {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 18px 20px;
  }

  body.pressidium-cc-theme #cc--main #s-bns .c-bn {
    width: 100%;
  }

  #nl-cookie-trigger.nl-cookie-trig {
    left: 14px;
    bottom: 16px;
    height: 42px;
    min-width: 42px;
    padding: 0 11px;
  }

  html[dir="rtl"] #nl-cookie-trigger.nl-cookie-trig {
    left: auto;
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.pressidium-cc-theme #cc--main #c-bns .c-bn,
  body.pressidium-cc-theme #cc--main #s-bns .c-bn,
  #nl-cookie-trigger.nl-cookie-trig,
  #nl-cookie-trigger.nl-cookie-trig .nl-ct-label {
    transition: none !important;
  }
}
