/* Стили для чекбоксов согласия на обработку персональных данных */

/* Скрываем стандартный чекбокс */
input[type="checkbox"][name="pd_consent"],
.pd-consent-label input[type="checkbox"][name="pd_consent"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    border: 1px solid #fff !important;
    background: transparent !important;
    cursor: pointer;
    position: relative;
    vertical-align: top;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    border-radius: 2px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Стиль для отмеченного чекбокса */
input[type="checkbox"][name="pd_consent"]:checked,
.pd-consent-label input[type="checkbox"][name="pd_consent"]:checked {
    background: #fff !important;
    border-color: #fff !important;
}

/* Галочка для отмеченного чекбокса */
input[type="checkbox"][name="pd_consent"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid #009ddc;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    box-sizing: border-box;
}

/* Стили для label с чекбоксом */
label:has(input[type="checkbox"][name="pd_consent"]) {
    display: flex;
    align-items: flex-start;
    margin: 10px 0 15px;
    font-size: 12px;
    color: #fff;
    line-height: 1.4;
    cursor: pointer;
    font-weight: 100;
    font-family: 'PF_DinText_Pro', sans-serif;
}

/* Для форм с синим фоном */
.form_answer label:has(input[type="checkbox"][name="pd_consent"]),
.form_hww label:has(input[type="checkbox"][name="pd_consent"]),
.form_qr label:has(input[type="checkbox"][name="pd_consent"]),
.global_form label:has(input[type="checkbox"][name="pd_consent"]) {
    color: #fff;
}

/* Ссылка в тексте согласия */
label:has(input[type="checkbox"][name="pd_consent"]) a {
    color: #fff;
    text-decoration: underline;
    transition: opacity 0.3s;
}

label:has(input[type="checkbox"][name="pd_consent"]) a:hover {
    opacity: 0.8;
}

/* Для формы с белым фоном (form_qr) */
.form_qr label:has(input[type="checkbox"][name="pd_consent"]) {
    color: #fff;
}

/* Hover эффект для чекбокса */
input[type="checkbox"][name="pd_consent"]:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Focus состояние */
input[type="checkbox"][name="pd_consent"]:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    label:has(input[type="checkbox"][name="pd_consent"]) {
        font-size: 11px;
        line-height: 1.3;
    }
    
    input[type="checkbox"][name="pd_consent"] {
        width: 16px;
        height: 16px;
        margin-right: 8px;
    }
    
    input[type="checkbox"][name="pd_consent"]:checked::after {
        left: 4px;
        top: 1px;
        width: 4px;
        height: 8px;
    }
}

/* Fallback для браузеров без поддержки :has() */
.pd-consent-label {
    display: flex !important;
    align-items: flex-start;
    margin: 12px 0 15px;
    font-size: 12px;
    color: #fff !important;
    line-height: 1.5;
    cursor: pointer;
    font-weight: 100;
    font-family: 'PF_DinText_Pro', sans-serif;
}

.pd-consent-label span {
    flex: 1;
    line-height: 1.5;
    color: #fff !important;
}

.pd-consent-label a {
    color: #fff !important;
    text-decoration: underline;
    transition: opacity 0.3s;
}

.pd-consent-label a:hover {
    opacity: 0.8;
}

/* Дополнительная специфичность для форм */
.form_qr .pd-consent-label,
.form_answer .pd-consent-label,
.form_hww .pd-consent-label,
.global_form .pd-consent-label {
    color: #fff !important;
    margin: 10px 0 10px 27px;
}

.form_qr .pd-consent-label span,
.form_answer .pd-consent-label span,
.form_hww .pd-consent-label span,
.global_form .pd-consent-label span {
    color: #fff !important;
}

/* Специальные стили для формы form_hww */
/* Убираем flex для формы, чтобы input поля оставались горизонтальными */

.form_hww .pd-consent-label {
    margin: 10px 0 0 27px;
    width: auto;
    display: inline-flex;
    vertical-align: middle;
    flex: 0 0 auto;
}

.form_hww .button_hww {
    float: right;
    margin: 10px 46px 0 0;
    vertical-align: middle;
    clear: none;
    align-self: flex-end;
    margin-top: 10px;
}

/* Контейнер для чекбокса и кнопки на одном уровне */
.form_hww::after {
    content: '';
    display: table;
    clear: both;
}

/* Контейнер для чекбокса и кнопки на одном уровне */
.form_hww-consent-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 10px 27px 10px 27px;
    width: calc(100% - 54px);
    gap: 20px;
    clear: both;
}

.form_hww-consent-row .pd-consent-label {
    margin: 0;
    flex: 1;
    max-width: calc(100% - 450px);
}

.form_hww-consent-row .button_hww {
    float: none;
    margin: 0;
    flex-shrink: 0;
    width: 426px;
}

/* Контейнер для чекбокса и кнопки в форме form_answer */
.form_answer-consent-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 10px 27px 10px 27px;
    width: calc(100% - 54px);
    gap: 20px;
    clear: both;
}

.form_answer-consent-row .pd-consent-label {
    margin: 0;
    flex: 1;
    max-width: calc(100% - 300px);
}

.form_answer-consent-row .button_answer {
    float: none;
    margin: 0;
    flex-shrink: 0;
    width: auto;
    min-width: 200px;
}

/* Контейнер для чекбокса и кнопки в форме global_form */
.global_form-consent-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 10px 15px 20px 15px;
    gap: 15px;
}

.global_form-consent-row .pd-consent-label {
    margin: 0;
    flex: 1;
    font-size: 11px;
}

.global_form-consent-row .but_global_form {
    float: none;
    margin: 0;
    flex-shrink: 0;
    width: auto;
    min-width: 120px;
}

/* Контейнер для полей ввода и кнопки в форме form_qr */
.left_input {
    clear: both;
    overflow: hidden;
    width: 100%;
}

.left_input::after {
    content: '';
    display: table;
    clear: both;
}

/* Строка с полями ввода и кнопкой */
.form_qr-inputs-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    clear: both;
    width: 100%;
}

.form_qr-inputs-row input {
    float: none !important;
    margin: 0 !important;
    flex: 0 0 276px;
}

.form_qr-inputs-row .button_qr {
    float: none !important;
    margin: 0 !important;
    flex-shrink: 0;
    width: 262px !important;
    height: 48px !important;
    display: block;
}

/* Чекбокс согласия под полями */
.left_input .pd-consent-label {
    margin: 8px 0 0 0;
    font-size: 12px;
    line-height: 1.4;
    clear: both;
    display: block;
}

