/* CardPackZone-only skin for the shared consent banner.
   Load AFTER the shared include's <style> so these overrides win.
   Does not change marketing-funnels/shared or other sites. */

/* ---- First layer: full-width 72px strip ---- */
#consent-banner.consent-banner,
#consent-banner.consent-banner.show {
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  height: 72px;
  transform: none;
  opacity: 1;
  justify-content: center;
  align-items: center;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -8px 24px -12px rgba(17, 23, 39, 0.12);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

#consent-banner .consent-banner-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 44px;
  width: fit-content;
  max-width: 900px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  position: relative;
}

#consent-banner .consent-banner-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
}

/* Beats the shared 80px !important */
#consent-banner .consent-banner-header > svg {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px;
}

#consent-banner .consent-banner-title {
  min-width: 0;
}

#consent-banner .consent-banner-title h3 {
  display: inline;
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #111727;
}

#consent-banner .consent-banner-title h3::after {
  content: ". ";
}

#consent-banner .consent-banner-title p {
  display: inline;
  margin: 0;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.35;
  color: #4a5566;
}

#consent-banner .consent-banner-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex: 0 0 auto;
}

#consent-banner .consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.14px;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
  width: auto;
  overflow: visible;
  box-shadow: none;
  transform: none;
}

#consent-banner .consent-btn::before {
  display: none;
}

#consent-banner .consent-btn-secondary {
  background: #fff;
  color: #020821;
  border: 1px solid #d5dbe3;
}

#consent-banner .consent-btn-secondary:hover {
  background: #f4f6f9;
  border-color: #020821;
  transform: none;
  box-shadow: none;
}

#consent-banner .consent-btn-primary {
  background: #0caf5b;
  border: 1px solid #0caf5b;
  color: #fff;
  box-shadow: 0 1px 1px rgba(20, 21, 26, 0.05);
}

#consent-banner .consent-btn-primary:hover {
  background: #0a9a50;
  border-color: #0a9a50;
  transform: none;
  box-shadow: 0 1px 1px rgba(20, 21, 26, 0.05);
}

#consent-banner .consent-btn-primary svg {
  display: none;
}

#consent-banner .consent-banner-close {
  display: none !important;
}

/* ---- Settings / customize layer (visual only; categories unchanged) ---- */
#consent-customize .consent-customize-card {
  width: 480px;
  max-width: calc(100vw - 32px);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px -10px rgba(80, 30, 20, 0.14), 0 2px 8px -4px rgba(17, 23, 39, 0.06);
  font-family: Inter, system-ui, sans-serif;
}

#consent-customize .consent-customize-header {
  align-items: center;
  margin-bottom: 16px;
}

#consent-customize .consent-customize-header > svg {
  width: 32px !important;
  height: 32px !important;
}

#consent-customize .consent-customize-title h3 {
  font-size: 16px;
  font-weight: 650;
  color: #111727;
  margin: 0 0 4px;
}

#consent-customize .consent-customize-title p {
  font-size: 13px;
  color: #4a5566;
}

#consent-customize .consent-option {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

#consent-customize .consent-customize-actions {
  margin-top: 16px;
  gap: 8px;
}

#consent-customize .consent-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
  flex: 1 1 auto;
  width: auto;
  box-shadow: none;
}

#consent-customize .consent-btn::before { display: none; }

#consent-customize .consent-btn-secondary {
  background: #fff;
  color: #020821;
  border: 1px solid #d5dbe3;
}

#consent-customize .consent-btn-primary {
  background: #0caf5b;
  border: 1px solid #0caf5b;
  color: #fff;
}

#consent-customize .consent-btn-primary svg { display: none; }

#consent-customize .consent-customize-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f4f6f9;
  color: #64748b;
  top: 16px;
  right: 16px;
}

/* ---- Mobile: stacked sheet, more space above the buttons ---- */
@media (max-width: 768px) {
  /* First layer: compact bottom sheet that matches the mobile board
     (16px gutters, 44px pill buttons, Inter), above the iOS home bar. */
  #consent-banner.consent-banner,
  #consent-banner.consent-banner.show {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
    bottom: 0;
    box-sizing: border-box;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px -12px rgba(17, 23, 39, 0.18);
  }

  #consent-banner .consent-banner-card {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    padding: 0 16px;
    box-sizing: border-box;
  }

  #consent-banner .consent-banner-header {
    gap: 10px;
    margin: 0;
    align-items: flex-start;
    min-width: 0;
  }

  /* Small cookie, centred on the first text line (18px line box). */
  #consent-banner .consent-banner-header > svg {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px;
    margin-top: -1px;
  }

  #consent-banner .consent-banner-title {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 18px;
    overflow-wrap: anywhere;
  }

  #consent-banner .consent-banner-title h3,
  #consent-banner .consent-banner-title p {
    display: inline;
    font-size: 13px;
    line-height: 18px;
    letter-spacing: -0.13px;
  }

  #consent-banner .consent-banner-title h3 {
    font-size: 14px;
    letter-spacing: -0.14px;
  }

  #consent-banner .consent-banner-actions {
    display: flex;
    flex-direction: row;
    width: 100%;
    margin: 0;
    gap: 8px;
  }

  #consent-banner .consent-btn {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.14px;
  }

  /* Settings layer: fits the screen, scrolls inside, buttons as on the banner. */
  #consent-customize .consent-customize-card {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 32px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 20px 16px 16px;
    box-sizing: border-box;
  }

  #consent-customize .consent-customize-header {
    align-items: flex-start;
    gap: 10px;
    padding-right: 40px;
  }

  #consent-customize .consent-customize-header > svg {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px;
    margin-top: 0;
  }

  #consent-customize .consent-customize-title p {
    line-height: 18px;
  }

  #consent-customize .consent-customize-close {
    top: 12px;
    right: 12px;
  }

  #consent-customize .consent-customize-actions {
    flex-direction: row;
    gap: 8px;
  }

  #consent-customize .consent-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
  }
}
