.terms-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.7);
}

.terms-consent-overlay,
.terms-consent-overlay * {
  box-sizing: border-box;
}

.terms-consent-modal {
  display: flex;
  width: min(760px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.terms-consent-header {
  position: static;
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  padding: 24px 28px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.terms-consent-header h2 {
  margin: 0 0 7px;
  color: #111827;
  font-size: 24px;
}

.terms-consent-header p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.terms-consent-content {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  padding: 24px 28px;
  overflow-y: auto;
  color: #374151;
  font-size: 14px;
  line-height: 1.7;
}

.terms-consent-content h3 {
  margin: 22px 0 7px;
  color: #111827;
  font-size: 16px;
}

.terms-consent-content h3:first-child {
  margin-top: 0;
}

.terms-consent-content p,
.terms-consent-content ol {
  margin: 0;
}

.terms-consent-content ol {
  padding-left: 21px;
}

.terms-consent-highlight {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
}

.terms-consent-actions {
  position: static;
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  padding: 18px 28px 24px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.terms-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
}

.terms-consent-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--pr, #2a80ff);
}

.terms-consent-submit {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--pr, #2a80ff);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.terms-consent-submit:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.terms-consent-error {
  display: none;
  margin: 0 0 10px;
  color: #dc2626;
  font-size: 13px;
}

body.terms-consent-locked {
  overflow: hidden;
}

@media (max-width: 600px) {
  .terms-consent-overlay {
    padding: 10px;
  }

  .terms-consent-modal {
    max-height: calc(100vh - 20px);
  }

  .terms-consent-header,
  .terms-consent-content,
  .terms-consent-actions {
    padding-left: 18px;
    padding-right: 18px;
  }
}
