/* consent-checkboxes.css
   Общие стили блока согласий: React-компонент ConsentCheckboxes (index.html)
   и vanilla-модуль consent-checkboxes.js (quiz.html, zagranica.html).
   Размер текста ≥ 13px, область нажатия чекбокса 24×24, бренд #7C5CF0. */

.alfin-consents {
  --ac-brand: #7C5CF0;
  --ac-brand-deep: #322890;
  --ac-text: #43434d;
  --ac-link: #7C5CF0;
  --ac-box-border: #b9b3d9;
  --ac-box-bg: #fff;
  --ac-error: #d6453a;
  --ac-error-soft: rgba(214, 69, 58, 0.10);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(60, 50, 110, 0.18);
  text-align: left;
}

/* Тёмная/стеклянная тема модалки на главной */
.alfin-consents--glass {
  --ac-text: var(--fg-muted, rgba(21, 23, 42, 0.72));
  --ac-link: var(--primary-deep, #322890);
  --ac-box-bg: var(--glass-2, #fff);
  border-top-color: var(--line, rgba(60, 50, 110, 0.18));
}

.alfin-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 24px;
  padding: 2px 6px 2px 2px;
  margin: 0 -2px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ac-text);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.alfin-consent-row--disabled { cursor: default; opacity: .7; }

.alfin-consent-row input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 0;
  border-radius: 7px;
  border: 1.5px solid var(--ac-box-border);
  background: var(--ac-box-bg);
  cursor: inherit;
  display: grid;
  place-content: center;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.alfin-consent-row input[type="checkbox"]::after {
  content: "";
  width: 12px;
  height: 7px;
  margin-top: -2px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform .12s;
}
.alfin-consent-row input[type="checkbox"]:checked {
  background: var(--ac-brand);
  border-color: var(--ac-brand);
}
.alfin-consent-row input[type="checkbox"]:checked::after {
  transform: rotate(-45deg) scale(1);
}
.alfin-consent-row input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 92, 240, 0.35);
}

.alfin-consent-row__text { padding-top: 2px; min-width: 0; }
.alfin-consent-row__text a {
  color: var(--ac-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.alfin-consent-row__opt { color: inherit; opacity: .65; }

/* Не отмеченный обязательный пункт после попытки отправки */
.alfin-consent-row--error {
  background: var(--ac-error-soft);
  border-color: rgba(214, 69, 58, 0.45);
}
.alfin-consent-row--error input[type="checkbox"] {
  border-color: var(--ac-error);
}

.alfin-consents__error {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ac-error);
}
