@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

#cb-root {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1100px;
  z-index: 2147480000;
  padding: 0 24px;
  box-sizing: border-box;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 300ms ease-out;
}

#cb-root.cb-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

#cb-root * {
  box-sizing: border-box;
}

.cb-dialog {
  background: rgba(8, 8, 10, 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  padding: 28px 32px;
  color: #f5f5f5;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#cb-root.cb-manage-open {
  inset: 0;
  transform: none;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 0, 0, .55);
  overscroll-behavior: none;
}

#cb-root.cb-manage-open .cb-dialog {
  width: 100%;
  max-width: 900px;
  min-height: 0;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
}

.cb-summary {
  display: block;
}

.cb-summary-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.cb-icon-cookie {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.cb-text-col {
  flex: 1;
  min-width: 0;
}

.cb-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0 0 6px 0;
  color: #ffffff;
}

.cb-lede {
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
  color: rgba(245, 245, 245, 0.78);
  font-weight: 500;
}

.cb-lede a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 200ms ease;
}

.cb-lede a:hover,
.cb-lede a:focus-visible {
  text-decoration-color: rgba(255, 255, 255, 1);
}

.cb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
}

.cb-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 200ms ease;
  border: 1.5px solid transparent;
  white-space: nowrap;
  line-height: 1;
}

.cb-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.cb-btn-primary {
  background: #ffffff;
  color: #050505;
  border-color: #ffffff;
}

.cb-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.18);
}

.cb-btn-secondary {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

.cb-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.45);
}

.cb-btn-tertiary {
  background: transparent;
  color: rgba(245, 245, 245, 0.78);
  border-color: transparent;
  padding: 11px 14px;
  text-decoration: underline;
  text-decoration-color: rgba(245, 245, 245, 0.3);
  text-underline-offset: 3px;
}

.cb-btn-tertiary:hover {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.04);
}

.cb-manage {
  display: none;
}

#cb-root.cb-manage-open .cb-summary {
  display: none;
}

#cb-root.cb-manage-open .cb-manage {
  display: block;
}

.cb-manage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}

.cb-manage-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.cb-manage-sub {
  font-size: 12.5px;
  color: rgba(245, 245, 245, 0.65);
  margin: 4px 0 0 0;
  font-weight: 500;
}

.cb-close-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(245, 245, 245, 0.8);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
}

.cb-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.cb-close-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.cb-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cb-category-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color 200ms ease, background 200ms ease;
}

.cb-category-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.cb-cat-content {
  flex: 1;
  min-width: 0;
}

.cb-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.cb-cat-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.cb-cat-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  line-height: 1.4;
}

.cb-pill-necessary {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.cb-pill-analytics {
  background: rgba(234, 179, 8, 0.14);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.cb-pill-advertising {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.cb-cat-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(245, 245, 245, 0.72);
  margin: 0 0 8px 0;
  font-weight: 500;
}

.cb-cat-more {
  font-size: 12px;
  color: rgba(245, 245, 245, 0.55);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(245, 245, 245, 0.25);
  text-underline-offset: 2px;
  transition: color 200ms ease, text-decoration-color 200ms ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cb-cat-more:hover,
.cb-cat-more:focus-visible {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.8);
  outline: none;
}

.cb-toggle-wrap {
  flex-shrink: 0;
  padding-top: 2px;
}

.cb-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
}

.cb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cb-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  transition: all 250ms ease;
}

.cb-toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  border-radius: 50%;
  transition: all 250ms ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cb-toggle input:checked + .cb-toggle-slider {
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.85) 100%);
  border-color: #ffffff;
}

.cb-toggle input:checked + .cb-toggle-slider::before {
  transform: translate(20px, -50%);
  background: #050505;
}

.cb-toggle input:focus-visible + .cb-toggle-slider {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.cb-toggle input:disabled + .cb-toggle-slider {
  cursor: not-allowed;
  opacity: 0.75;
}

.cb-toggle input:disabled + .cb-toggle-slider::before {
  box-shadow: none;
}

.cb-toggle-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  pointer-events: none;
  color: rgba(5, 5, 5, 0.7);
  font-weight: 800;
  z-index: 2;
}

.cb-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
}

.cb-manage-actions-left,
.cb-manage-actions-right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cb-version-tag {
  font-size: 11px;
  color: rgba(245, 245, 245, 0.38);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0 8px;
}

@media (max-width: 768px) {
  #cb-root {
    bottom: 12px;
    padding: 0 12px;
    max-width: none;
    width: calc(100vw - 0px);
  }

  .cb-dialog {
    border-radius: 20px;
    padding: 22px 20px;
  }

  .cb-summary-head {
    gap: 14px;
    margin-bottom: 14px;
  }

  .cb-icon-cookie {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 19px;
  }

  .cb-title {
    font-size: 15.5px;
  }

  .cb-lede {
    font-size: 13px;
    line-height: 1.5;
  }

  .cb-actions {
    gap: 8px;
    margin-top: 18px;
  }

  .cb-btn {
    font-size: 12.5px;
    padding: 10px 18px;
    flex: 1;
    min-width: 0;
  }

  .cb-btn-tertiary {
    flex: 0 0 auto;
    width: 100%;
    order: 3;
    padding: 10px 14px;
    margin-top: 2px;
  }

  .cb-manage-head {
    margin-bottom: 18px;
  }

  .cb-manage-title {
    font-size: 16px;
  }

  .cb-category-card {
    padding: 16px;
    gap: 12px;
    flex-direction: column;
  }

  .cb-toggle-wrap {
    align-self: flex-end;
    margin-top: -4px;
  }

  .cb-manage-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .cb-manage-actions-left,
  .cb-manage-actions-right {
    gap: 8px;
  }

  .cb-manage-actions-right .cb-btn {
    flex: 1;
  }

  .cb-manage-actions-left .cb-btn {
    flex: 1;
  }

  .cb-version-tag {
    text-align: center;
    padding: 2px 0 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cb-root,
  .cb-btn,
  .cb-toggle-slider,
  .cb-toggle-slider::before,
  .cb-category-card,
  .cb-close-btn,
  .cb-lede a {
    transition: none !important;
  }
}
