@charset "UTF-8";

/* Токены форм WPForms. Включается классом custom_style на контейнере формы,
   темная тема - второй класс custom_style__dark. */

/* Светлая (по умолчанию). :not(*) - чтобы не перебить темные значения,
   унаследованные от темной обертки. */
.custom_style:not(.custom_style__dark):not(.custom_style__dark *) {
    --custom_style__surface: #FFFFFF;
    --custom_style__surface_border: #E2E8F0;
    --custom_style__surface_shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.12);

    --custom_style__input_bg: #FFFFFF;
    --custom_style__input_bg_hover: #FFFFFF;
    --custom_style__input_bg_disabled: #F1F5F9;

    --custom_style__border: #94A3B8;
    --custom_style__border_hover: #475569;
    --custom_style__border_focus: #C8102E;
    --custom_style__focus_ring: rgba(200, 16, 46, 0.16);
    --custom_style__divider: #E2E8F0;

    --custom_style__text: #0F172A;
    --custom_style__label: #1E293B;
    --custom_style__muted: #475569;
    --custom_style__placeholder: #94A3B8;

    --custom_style__accent: #C8102E;
    --custom_style__accent_hover: #A50B24;
    --custom_style__accent_text: #FFFFFF;
    --custom_style__accent_shadow: rgba(200, 16, 46, 0.45);
    --custom_style__accent_shadow_hover: rgba(200, 16, 46, 0.55);

    --custom_style__error: #C8102E;
    --custom_style__error_bg: rgba(200, 16, 46, 0.04);
    --custom_style__error_ring: rgba(200, 16, 46, 0.18);

    --custom_style__success_bg: #DCFCE7;
    --custom_style__success_border: #86EFAC;
    --custom_style__success_text: #14532D;

    --custom_style__option_bg: #F8FAFC;
    --custom_style__option_bg_hover: #F1F5F9;
    --custom_style__option_border: #CBD5E1;

    --custom_style__link: #C8102E;

    --custom_style__select_arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231E293B' d='M2.22 4.22a.75.75 0 0 1 1.06 0L6 6.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L2.22 5.28a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E");
    --custom_style__error_icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23C8102E'/%3E%3Cpath d='M8 4.2v4.6' stroke='%23FFFFFF' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.6' r='1' fill='%23FFFFFF'/%3E%3C/svg%3E");

    /* Чекбоксы и радио отданы родным правилам WPForms: он сам рисует
       рамку на ::before и галочку на ::after и сам гасит их в состоянии
       ошибки. Мы только задаем цвета через его переменные, иначе наши
       псевдоэлементы складываются с его и значки двоятся. */
    --wpforms-field-border-color: #94A3B8;
    --wpforms-field-background-color: #FFFFFF;
    --wpforms-field-text-color: #0F172A;
    --wpforms-field-menu-color: #FFFFFF;
    --wpforms-button-background-color: #C8102E;
    --wpforms-label-error-color: #C8102E;
}

/* Общая часть для светлой и темной темы: то, что не зависит от палитры.
   Держать это только в светлом блоке нельзя: он отключен через :not(),
   и темная форма теряет переменные - поля схлопываются по высоте.
   Размер квадрата чекбокса сюда не входит: WPForms пишет его инлайновым
   правилом с id формы (#wpforms-XXX), а id перебивает любой класс,
   поэтому размер задается в настройках поля. */
.custom_style {
    --custom_style__font: "Exo 2", system-ui, -apple-system, "Segoe UI", sans-serif;

    --custom_style__radius_card: 12px;
    --custom_style__radius_control: 8px;
    --custom_style__control_height: 48px;

    --wpforms-field-border-size: 1.5px;
    --wpforms-field-border-style: solid;
}

/* Темная */
.custom_style__dark {
    --custom_style__surface: #1E2229;
    --custom_style__surface_border: #262B34;
    --custom_style__surface_shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.55);

    --custom_style__input_bg: #16191E;
    --custom_style__input_bg_hover: #12151A;
    --custom_style__input_bg_disabled: #2A303A;

    --custom_style__border: #37404E;
    --custom_style__border_hover: #64748B;
    --custom_style__border_focus: #FBBF24;
    --custom_style__focus_ring: rgba(251, 191, 36, 0.18);
    --custom_style__divider: #2A303A;

    --custom_style__text: #F8FAFC;
    --custom_style__label: #E2E8F0;
    --custom_style__muted: #94A3B8;
    --custom_style__placeholder: #94A3B8;

    --custom_style__accent: #C8102E;
    --custom_style__accent_hover: #A50B24;
    --custom_style__accent_text: #FFFFFF;
    --custom_style__accent_shadow: rgba(200, 16, 46, 0.4);
    --custom_style__accent_shadow_hover: rgba(200, 16, 46, 0.5);

    --custom_style__error: #F87171;
    --custom_style__error_bg: rgba(248, 113, 113, 0.08);
    --custom_style__error_ring: rgba(248, 113, 113, 0.22);

    --custom_style__success_bg: rgba(16, 185, 129, 0.15);
    --custom_style__success_border: rgba(16, 185, 129, 0.4);
    --custom_style__success_text: #D1FAE5;

    --custom_style__option_bg: #16191E;
    --custom_style__option_bg_hover: #262B34;
    --custom_style__option_border: #2A303A;

    --custom_style__link: #FBBF24;

    --custom_style__select_arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23E2E8F0' d='M2.22 4.22a.75.75 0 0 1 1.06 0L6 6.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L2.22 5.28a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E");
    --custom_style__error_icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23F87171'/%3E%3Cpath d='M8 4.2v4.6' stroke='%2316191E' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.6' r='1' fill='%2316191E'/%3E%3C/svg%3E");

    --wpforms-field-border-color: #37404E;
    --wpforms-field-background-color: #16191E;
    --wpforms-field-text-color: #F8FAFC;
    --wpforms-field-menu-color: #16191E;
    --wpforms-button-background-color: #C8102E;
    --wpforms-label-error-color: #F87171;
}
