/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

/* ===== Базовые стили формы ===== */
.wpcf7 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1a1a1a;
  max-width: 760px;
  margin: 0 auto;
}

.wpcf7 form {
  background: #ffffff;
  padding: 28px 32px 36px;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.wpcf7 p {
  margin-bottom: 18px;
}

/* Увеличенный отступ между лейблом и полем */
.wpcf7 label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: #333;
}

/* Поля ввода */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.22);
}

.wpcf7 textarea {
  min-height: 80px;
  resize: vertical;
}

/* ===== Поле загрузки файла ===== */
.wpcf7 input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.wpcf7 input[type="file"]:hover {
  border-color: #4a90e2;
}

.wpcf7 input[type="file"]::file-selector-button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: #4a90e2;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  margin-right: 12px;
  transition: background 0.2s;
}

.wpcf7 input[type="file"]::file-selector-button:hover {
  background: #3a7bc8;
}

/* ===== Подсказки под полями ===== */
.cf7-hint {
  display: block;
  font-size: 12px;
  color: #777;
  margin-top: 6px;
  line-height: 1.4;
}

/* ===== Раскладка в строки ===== */
.cf7-row {
  display: flex;
  gap: 16px;
  margin-bottom: 4px;
}

.cf7-row > p {
  flex: 1;
  margin-bottom: 18px !important;
}

.cf7-row.three-cols > p {
  flex: 1 1 0;
  min-width: 0;
}

.cf7-row.two-cols > p {
  flex: 1 1 0;
  min-width: 0;
}

/* ===== Тип участия — кнопки ===== */
.participation-type {
  margin-bottom: 28px !important;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8e8e8;
}

.participation-type .wpcf7-radio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.participation-type .wpcf7-list-item {
  margin: 0;
}

.participation-type .wpcf7-list-item label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 10px;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  box-sizing: border-box;
}

.participation-type .wpcf7-list-item label:hover {
  border-color: #4a90e2;
  color: #4a90e2;
}

/* Скрываем стандартный radio */
.participation-type input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Выбранная кнопка */
.participation-type .wpcf7-list-item:has(input:checked) label {
  background: #4a90e2;
  border-color: #4a90e2;
  color: #fff;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.35);
}

/* ===== Современные радиокнопки (слайдеры) ===== */
.gender-field .wpcf7-radio,
.language-field .wpcf7-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.gender-field .wpcf7-list-item,
.language-field .wpcf7-list-item {
  margin: 0;
}

.gender-field .wpcf7-list-item label,
.language-field .wpcf7-list-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
  margin: 0;
}

/* Скрываем стандартный radio */
.gender-field input[type="radio"],
.language-field input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Кастомный слайдер */
.gender-field .wpcf7-list-item label::before,
.language-field .wpcf7-list-item label::before {
  content: "";
  display: inline-block;
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 24px;
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
}

.gender-field .wpcf7-list-item label::after,
.language-field .wpcf7-list-item label::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  left: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left 0.25s;
  pointer-events: none;
}

/* Позиционирование кружка относительно label */
.gender-field .wpcf7-list-item label,
.language-field .wpcf7-list-item label {
  position: relative;
}

.gender-field .wpcf7-list-item input:checked + span + label::before,
.language-field .wpcf7-list-item input:checked + span + label::before,
.gender-field .wpcf7-list-item:has(input:checked) label::before,
.language-field .wpcf7-list-item:has(input:checked) label::before {
  background: #4a90e2;
}

.gender-field .wpcf7-list-item:has(input:checked) label::after,
.language-field .wpcf7-list-item:has(input:checked) label::after {
  left: 23px;
}

/* Чекбоксы (простые, но аккуратные) */
.wpcf7 .wpcf7-checkbox .wpcf7-list-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 8px;
}

.wpcf7 input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #4a90e2;
  cursor: pointer;
}

/* ===== Кнопка отправки ===== */
.wpcf7 input[type="submit"],
.wpcf7 .submit-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 14px 20px;
  background: #4a90e2;
  color: #fff !important;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.wpcf7 input[type="submit"]:hover {
  background: #3a7bc8;
  box-shadow: 0 4px 14px rgba(74, 144, 226, 0.4);
}

.wpcf7 input[type="submit"]:active {
  transform: scale(0.98);
}

/* ===== Адаптив ===== */
@media (max-width: 640px) {
  .wpcf7 form {
    padding: 20px 16px 28px;
  }

  .cf7-row {
    flex-direction: column;
    gap: 0;
  }

  .participation-type .wpcf7-radio {
    grid-template-columns: 1fr;
  }
}