.bccs-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(4px);
}

.bccs-modal[hidden] {
  display: none;
}

.bccs-modal-open {
  overflow: hidden;
}

.bccs-dialog {
  width: min(100%, 760px);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface, #ffffff);
  color: var(--text, #0f172a);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.bccs-dialog__inner {
  padding: 1.25rem;
}

.bccs-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.2;
}

.bccs-text {
  margin: 0 0 1rem;
  color: var(--text-soft, #475569);
}

.bccs-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.bccs-toggle-row {
  margin: 1rem 0;
}

.bccs-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line, #e2e8f0);
  background: transparent;
  color: var(--brand, #2563eb);
  font-weight: 700;
  cursor: pointer;
}

.bccs-toggle-button:hover {
  background: rgba(37, 99, 235, 0.06);
}

#bccs-options[hidden] {
  display: none;
}

.bccs-options {
  margin: 0 0 1rem;
  display: grid;
  gap: 0.75rem;
}

.bccs-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  background: var(--surface-2, #f8fafc);
}

.bccs-option input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1rem;
  height: 1rem;
}

.bccs-option__title {
  display: block;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.bccs-option__text {
  display: block;
  color: var(--text-soft, #475569);
  font-size: 0.95rem;
}

.bccs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.bccs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
}

.bccs-btn--primary {
  background: var(--brand, #2563eb);
  color: var(--brand-contrast, #ffffff);
}

.bccs-btn--primary:hover {
  background: var(--brand-dark, #1d4ed8);
}

.bccs-btn--secondary {
  background: transparent;
  color: var(--brand, #2563eb);
  border-color: var(--line, #e2e8f0);
}

.bccs-btn--secondary:hover {
  background: rgba(37, 99, 235, 0.06);
}

@media (prefers-color-scheme: dark) {
  .bccs-modal {
    background: rgba(0, 0, 0, 0.72);
  }

  .bccs-dialog {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  }
}