/* =========================================
   Кастомная форма (без таблиц)
   ========================================= */
.custom-form {
    max-width: 800px;
    margin: 30px 0;
    font-family: inherit;
    color: #2a2a2a;
}

.custom-form__row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.custom-form__label {
    width: 220px;
    flex-shrink: 0;
    padding-top: 12px;
    font-size: 14px;
    color: #2a2a2a;
}

.custom-form__field {
    flex: 1;
}

/* Поля ввода */
.custom-form__field input,
.custom-form__field textarea {
    width: 100%;
    max-width: 350px; 
    padding: 10px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s ease;
}

.custom-form__field input:focus,
.custom-form__field textarea:focus {
    border-color: #a9d01c; 
}

.custom-form__field textarea {
    resize: vertical;
    min-height: 120px;
}

/* Блок с чекбоксами */
.custom-form__check {
    margin-bottom: 15px;
    margin-left: 220px; /* Выравниваем по полям ввода */
    display: flex;
}

.custom-checkbox-fix {
    display: block;
    width: 100%;
    max-width: 500px; 
    position: relative;
}

/* Правильное скрытие системного чекбокса (клики работают) */
.custom-checkbox-fix input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
    z-index: -1;
}

.custom-checkbox-fix .checkbox-privat__text {
    display: block;
    padding-left: 30px; 
    font-size: 14px;
    line-height: 20px; 
    color: #2a2a2a;
    position: relative;
    cursor: pointer;
    min-height: 20px;
}

/* Квадратик и галочка */
.custom-checkbox-fix .checkbox-privat__text:before,
.custom-checkbox-fix .checkbox-privat__text:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0; 
    transform: none;
    box-sizing: border-box;
}

/* Салатовый фон */
.custom-checkbox-fix .checkbox-privat__text:before {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background-color: #a9d01c; 
}

/* Галочка (по умолчанию скрыта) */
.custom-checkbox-fix .checkbox-privat__text:after {
    width: 20px;
    height: 20px;
    /* Рисуем галочку через SVG прямо в CSS, чтобы не зависеть от путей к картинкам */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 14px; 
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0; 
    transition: opacity 0.2s ease;
}

/* Показываем галочку при выборе */
.custom-checkbox-fix input[type="checkbox"]:checked + .checkbox-privat__text:after {
    opacity: 1;
}

/* Ссылки */
.custom-checkbox-fix .checkbox-privat__text a {
    color: #096dd9;
    text-decoration: underline;
}

.custom-checkbox-fix .checkbox-privat__text a:hover {
    text-decoration: none;
}

/* Кнопка отправки */
.custom-form__submit {
    margin-left: 220px; 
    margin-top: 10px;
}

.custom-form__submit button {
    background: #a9d01c; 
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.custom-form__submit button:hover {
    background: #8fb514; 
}

/* Адаптив для мобильных */
@media screen and (max-width: 768px) {
    .custom-form__row {
        flex-direction: column;
    }
    .custom-form__label {
        width: 100%;
        padding-top: 0;
        margin-bottom: 8px;
        font-weight: 600; 
    }
    .custom-form__check,
    .custom-form__submit {
        margin-left: 0;
    }
    .custom-form__field input,
    .custom-form__field textarea,
    .custom-checkbox-fix {
        max-width: 100%;
    }
}

.fancybox-outer .checkbox-privat__text {
    display: block;
    padding-left: 30px; 
    font-size: 14px;
    line-height: 20px; 
    color: #fff;
    position: relative;
    cursor: pointer;
    min-height: 20px;
}

.fancybox-outer .custom-form__field input,
.fancybox-outer .custom-form__field textarea {
    width: 100%;
    max-width: none; 
    padding: 10px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s ease;
}

/* ===== Cookie banner (isolated) ===== */
.cookie {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    max-width: 400px;
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 21px;
    box-shadow: 0 20px 30px rgba(0, 0, 0, .1);
}

.cookie * {
    box-sizing: border-box;
}

.cookie > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cookie .nc_row {
    flex: 1 1 100%;
}

.cookie p {
    margin: 0;
    font-size: 12px;
    line-height: 21px;
}

.cookie a {
    color: #000;
    text-decoration: underline;
}

.cookie a:hover {
    color: #333;
    text-decoration: none;
}

.cookie .button-cookie {
    flex: 1 1 0;
    padding: 5px 15px;
    background: #a9d01c;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    line-height: 21px;
    white-space: nowrap;
    user-select: none;
    transition: opacity .2s ease;
}

.cookie .button-cookie:hover {
    opacity: 0.8;
}

/* серая кнопка "Не согласен" */
.cookie #cookie-decline {
    background: #f5f5f5;
    color: #262626;
}

/* ===== Cookie banner: mobile ===== */
@media screen and (max-width: 520px) {
    .cookie {
        max-width: 100%;
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 12px;
    }

    .cookie p {
        font-size: 11px;
        line-height: 18px;
    }

    .cookie > div {
        gap: 8px;
    }

    .cookie .button-cookie {
        padding: 8px 10px;
    }
}