@charset "UTF-8";

/* Поля формы: метки, input, select, textarea, ошибки валидации. */

.custom_style[class] .wpforms-form .wpforms-field .wpforms-field-label {
    display: block;
    margin: 0 0 7px 0;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--custom_style__label);
}

.custom_style[class] .wpforms-form .wpforms-field .wpforms-required-label {
    margin-left: 3px;
    color: var(--custom_style__accent);
    font-weight: 600;
}

.custom_style[class] .wpforms-form .wpforms-field .wpforms-field-sublabel {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--custom_style__muted);
}

.custom_style[class] .wpforms-form .wpforms-field .wpforms-field-description {
    margin: 6px 0 0 0;
    padding: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--custom_style__muted);
}

/* medium/large тянем на всю колонку сетки */
.custom_style[class] .wpforms-form input.wpforms-field-medium,
.custom_style[class] .wpforms-form input.wpforms-field-large,
.custom_style[class] .wpforms-form select.wpforms-field-medium,
.custom_style[class] .wpforms-form select.wpforms-field-large,
.custom_style[class] .wpforms-form textarea.wpforms-field-medium,
.custom_style[class] .wpforms-form textarea.wpforms-field-large,
.custom_style[class] .wpforms-form .wpforms-field-medium,
.custom_style[class] .wpforms-form .wpforms-field-large {
    width: 100%;
    max-width: 100%;
}

.custom_style[class] .wpforms-form input[type="text"],
.custom_style[class] .wpforms-form input[type="email"],
.custom_style[class] .wpforms-form input[type="tel"],
.custom_style[class] .wpforms-form input[type="url"],
.custom_style[class] .wpforms-form input[type="number"],
.custom_style[class] .wpforms-form input[type="password"],
.custom_style[class] .wpforms-form input[type="search"],
.custom_style[class] .wpforms-form input[type="date"],
.custom_style[class] .wpforms-form input[type="time"],
.custom_style[class] .wpforms-form select,
.custom_style[class] .wpforms-form textarea {
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-family: var(--custom_style__font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--custom_style__text);
    background-color: var(--custom_style__input_bg);
    border: 1px solid var(--custom_style__border);
    border-radius: var(--custom_style__radius_control);
    outline: none;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.custom_style[class] .wpforms-form input[type="text"],
.custom_style[class] .wpforms-form input[type="email"],
.custom_style[class] .wpforms-form input[type="tel"],
.custom_style[class] .wpforms-form input[type="url"],
.custom_style[class] .wpforms-form input[type="number"],
.custom_style[class] .wpforms-form input[type="password"],
.custom_style[class] .wpforms-form input[type="search"],
.custom_style[class] .wpforms-form input[type="date"],
.custom_style[class] .wpforms-form input[type="time"],
.custom_style[class] .wpforms-form select {
    height: var(--custom_style__control_height);
    padding: 0 14px;
}

.custom_style[class] .wpforms-form textarea {
    display: block;
    min-height: 120px;
    padding: 12px 14px;
    resize: vertical;
}

/* Стрелка select на SVG, без шрифтов иконок */
.custom_style[class] .wpforms-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px;
    cursor: pointer;
    background-image: var(--custom_style__select_arrow);
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 12px;
}

.custom_style[class] .wpforms-form select option {
    background-color: var(--custom_style__surface);
    color: var(--custom_style__text);
}

.custom_style[class] .wpforms-form input::placeholder,
.custom_style[class] .wpforms-form textarea::placeholder {
    color: var(--custom_style__placeholder);
    font-weight: 400;
    opacity: 1;
}

/* Легаси-псевдоэлемент нужен отдельно: WPForms и сторонние плагины правят
   именно ::-webkit-input-placeholder, а не ::placeholder, и на фокусе
   плагин ставит черный цвет через !important. Наше правило обязано быть
   с тем же легаси-псевдоэлементом и !important, иначе проигрывает. */
.custom_style[class] .wpforms-form input::-webkit-input-placeholder,
.custom_style[class] .wpforms-form textarea::-webkit-input-placeholder {
    color: var(--custom_style__placeholder) !important;
    opacity: 1;
}

.custom_style[class] .wpforms-form input:focus::-webkit-input-placeholder,
.custom_style[class] .wpforms-form textarea:focus::-webkit-input-placeholder {
    color: var(--custom_style__placeholder) !important;
    opacity: 1;
}

.custom_style[class] .wpforms-form input[type="text"]:hover,
.custom_style[class] .wpforms-form input[type="email"]:hover,
.custom_style[class] .wpforms-form input[type="tel"]:hover,
.custom_style[class] .wpforms-form select:hover,
.custom_style[class] .wpforms-form textarea:hover {
    background-color: var(--custom_style__input_bg_hover);
    border-color: var(--custom_style__border_hover);
}

.custom_style[class] .wpforms-form input[type="text"]:focus,
.custom_style[class] .wpforms-form input[type="email"]:focus,
.custom_style[class] .wpforms-form input[type="tel"]:focus,
.custom_style[class] .wpforms-form input[type="url"]:focus,
.custom_style[class] .wpforms-form input[type="number"]:focus,
.custom_style[class] .wpforms-form select:focus,
.custom_style[class] .wpforms-form textarea:focus {
    /* color повторяем: WPForms в состоянии фокуса подставляет свою
       --wpforms-field-text-color, и без этого текст уходит в черный. */
    color: var(--custom_style__text);
    border-color: var(--custom_style__border_focus);
    box-shadow: 0 0 0 3px var(--custom_style__focus_ring);
}

.custom_style[class] .wpforms-form input:disabled,
.custom_style[class] .wpforms-form select:disabled,
.custom_style[class] .wpforms-form textarea:disabled {
    background-color: var(--custom_style__input_bg_disabled);
    color: var(--custom_style__muted);
    cursor: not-allowed;
    opacity: 0.75;
}

/* Ошибки валидации */
.custom_style[class] .wpforms-form .wpforms-field.wpforms-has-error input[type="text"],
.custom_style[class] .wpforms-form .wpforms-field.wpforms-has-error input[type="email"],
.custom_style[class] .wpforms-form .wpforms-field.wpforms-has-error input[type="tel"],
.custom_style[class] .wpforms-form .wpforms-field.wpforms-has-error input[type="url"],
.custom_style[class] .wpforms-form .wpforms-field.wpforms-has-error input[type="number"],
.custom_style[class] .wpforms-form .wpforms-field.wpforms-has-error select,
.custom_style[class] .wpforms-form .wpforms-field.wpforms-has-error textarea,
.custom_style[class] .wpforms-form input.wpforms-error,
.custom_style[class] .wpforms-form select.wpforms-error,
.custom_style[class] .wpforms-form textarea.wpforms-error {
    background-color: var(--custom_style__error_bg);
    border-color: var(--custom_style__error);
}

.custom_style[class] .wpforms-form .wpforms-field.wpforms-has-error input:focus,
.custom_style[class] .wpforms-form .wpforms-field.wpforms-has-error select:focus,
.custom_style[class] .wpforms-form .wpforms-field.wpforms-has-error textarea:focus {
    box-shadow: 0 0 0 3px var(--custom_style__error_ring);
}

/* Рамку чекбокса и радио рисует ::before у WPForms, поэтому цвет
   ошибки задается там же, а не на самом input. */
.custom_style[class] .wpforms-form .wpforms-field.wpforms-has-error input[type="checkbox"]::before,
.custom_style[class] .wpforms-form .wpforms-field.wpforms-has-error input[type="radio"]::before {
    border-color: var(--custom_style__error);
}

.custom_style[class] .wpforms-form label.wpforms-error,
.custom_style[class] .wpforms-form em.wpforms-error {
    display: block;
    margin: 7px 0 0 0;
    padding: 0 0 0 22px;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.4;
    color: var(--custom_style__error);
    background-image: var(--custom_style__error_icon);
    background-repeat: no-repeat;
    /* background-position: left 2px center; */
    background-size: 15px 15px;
}

/* WPForms рисует свою иконку ошибки через ::before (треугольник на mask-image).
   Своя иконка уже в background-image выше, эту гасим, иначе их две. */
.custom_style[class] .wpforms-form label.wpforms-error::before,
.custom_style[class] .wpforms-form em.wpforms-error::before {
    content: none;
    display: none;
    -webkit-mask-image: none;
    mask-image: none;
}