/*
 * Linkci VGD — юридические элементы (L1, L3, L5). Утверждённый vgd-theme.css не изменяется.
 * Чекбокс согласия в формах CF7 ([acceptance pd-consent]), ссылки в старом подвале, сведения о медорганизации.
 */

/* ---------- Чекбокс согласия: общая часть ---------- */
.pd-consent { display: block; margin: 2px 0 12px; text-align: left; }
.pd-consent .wpcf7-form-control-wrap { display: block; }
/* CF7 даёт обёртке класс .wpcf7-form-control — снимаем стили поля ввода, которые тема вешает на этот класс */
html body .wpcf7-form .pd-consent .wpcf7-form-control.wpcf7-acceptance:not(.wpcf7-submit) {
  display: block !important; width: auto !important; height: auto !important; min-height: 0 !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; background: none !important;
  box-shadow: none !important; border-radius: 0 !important;
}
.pd-consent .wpcf7-list-item { display: block; margin: 0 !important; }
.pd-consent label {
  display: flex !important; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 13px !important; line-height: 1.45 !important; font-weight: 400 !important; text-transform: none !important;
  margin: 0 !important; color: inherit;
}
.pd-consent input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: 0 0 18px; width: 18px !important; height: 18px !important;
  margin: 1px 0 0 !important; padding: 0 !important; border-radius: 5px; cursor: pointer; position: relative;
  border: 1.5px solid currentColor; background: transparent; opacity: .85;
  transition: background .15s, border-color .15s, opacity .15s;
}
.pd-consent input[type="checkbox"]:checked { background: var(--v-sea, #2E8C83); border-color: var(--v-sea, #2E8C83); opacity: 1; }
.pd-consent input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.pd-consent input[type="checkbox"]:focus-visible { outline: 2px solid var(--v-ice, #A9CFD8); outline-offset: 2px; }
/* Все ссылки согласия: общая форма, чекбокс, баннер и модальные окна. */
html body .confid a,
html body .pd-consent a,
html body .main-banner__consent a {
  color: #1E6E68 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}
html body .confid a:hover,
html body .confid a:focus-visible,
html body .pd-consent a:hover,
html body .pd-consent a:focus-visible,
html body .main-banner__consent a:hover,
html body .main-banner__consent a:focus-visible {
  color: #1E4448 !important;
}
html body .modal-content .confid a,
html body .modal-content .pd-consent a,
html body .main-banner .confid a,
html body .main-banner .pd-consent a,
html body .main-banner .main-banner__consent a,
html body .m_1 .m_1_inf_form .confid a,
html body .m_1 .pd-consent a {
  color: #5CC0B3 !important;
}
html body .modal-content .confid a:hover,
html body .modal-content .confid a:focus-visible,
html body .modal-content .pd-consent a:hover,
html body .modal-content .pd-consent a:focus-visible,
html body .main-banner .confid a:hover,
html body .main-banner .confid a:focus-visible,
html body .main-banner .pd-consent a:hover,
html body .main-banner .pd-consent a:focus-visible,
html body .main-banner .main-banner__consent a:hover,
html body .main-banner .main-banner__consent a:focus-visible,
html body .m_1 .m_1_inf_form .confid a:hover,
html body .m_1 .m_1_inf_form .confid a:focus-visible,
html body .m_1 .pd-consent a:hover,
html body .m_1 .pd-consent a:focus-visible {
  color: #A9CFD8 !important;
}
html body .confid a:focus-visible,
html body .pd-consent a:focus-visible,
html body .main-banner__consent a:focus-visible {
  outline: 2px solid #5CC0B3 !important;
  outline-offset: 3px;
}

/* Кнопка отправки неактивна, пока нет согласия (поведение CF7) — это должно быть видно */
.wpcf7-form .wpcf7-submit:disabled, .wpcf7-form input[type="submit"][disabled] {
  opacity: .5 !important; cursor: not-allowed !important; box-shadow: none !important; filter: saturate(.6);
}

/* Цвет подписи: тёмные секции — светлый текст, светлые — тёмный */
.main-banner .pd-consent, .m_1 .pd-consent, .footer2 .pd-consent, .footer2-modal .pd-consent,
.modal .pd-consent { color: var(--v-fg-muted, rgba(231, 235, 232, .82)); }
body:not(.home) .page-white .pd-consent, body:not(.home) .o_1 .pd-consent, body:not(.home) .m_calc .pd-consent { color: var(--v-fg-l-muted, #454C49); }
/* Модальные окна старой темы на белом фоне */
.modal-content .pd-consent { color: #454C49; }

/* Мобильная версия: подпись по центру формы не нужна — чекбокс слева, текст рядом */
@media (max-width: 991px) {
  .pd-consent label { font-size: 13px !important; }
}

/* ---------- L1: ссылки в старом подвале (статьи блога) ---------- */
.vgd-legal-v1 { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; font-size: 13px; text-transform: none; }
.vgd-legal-v1 a { color: inherit !important; text-decoration: underline; text-underline-offset: 2px; opacity: .85; }
.vgd-legal-v1 a:hover { opacity: 1; }

/* ---------- L5: сведения о медорганизации / пометка для владельца (только локально) ---------- */
.vgd-owner-todo {
  display: inline-block; background: #FFF3C4 !important; color: #5A4300 !important; border: 1px dashed #C9A227;
  padding: 2px 8px; border-radius: 6px; font-size: 12px; line-height: 1.4;
}
.vgd-contact-org { margin-top: 18px; font-size: 14px; color: var(--v-fg-l-muted, #454C49); }

/* ---------- Форма документов: приём приостановлен (inc/security.php) ---------- */
.vgd-docs-paused { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--v-glass-line, rgba(231,235,232,.13)); background: var(--v-glass, rgba(231,235,232,.05)); text-align: left; }
.vgd-docs-paused__title { font-family: var(--v-display, sans-serif); font-weight: 500; font-size: 17px; line-height: 1.3; margin: 0 0 6px !important; letter-spacing: -.01em; }
.vgd-docs-paused__text { font-size: 14px; line-height: 1.5; margin: 0 !important; opacity: .85; }
.modal-content .vgd-docs-paused, body:not(.home) .page-white .vgd-docs-paused { border-color: var(--v-line-l, rgba(42,47,44,.12)); background: rgba(255,255,255,.7); color: var(--v-fg-l, #1F2421); }
