@import url(https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;600&display=swap);*,*::before,*::after {
    box-sizing: border-box!important
}

form.hs-form {
    max-width: 672px!important;
}

.hs-form fieldset {
    max-width: 672px!important;
    padding: 0!important
}

.hs-form .hs-form-field {
    float: left!important;
    width: 50%!important;
    padding: 0 10px!important;
    clear: none!important;
    box-sizing: border-box!important;
    position: relative!important;
    /* Уменьшение вертикального расстояния между полями */
    padding-bottom: 12px!important; /* Было 20px */
    margin-bottom: 3px!important; /* Было 5px */
}

/* Фикс для селектора страны - всегда 50% ширины */
.hs-form .hs-form-field.hs-fieldtype-select {
    width: 50%!important;
    max-width: 50%!important;
    box-sizing: border-box!important;
}

.hs-form input[type="text"],.hs-form input[type="email"],.hs-form input[type="tel"],.hs-form input[type="url"],.hs-form input[type="number"],.hs-form input[type="date"],.hs-form textarea,.hs-form select {
    background-color: #FFFFFF!important;
    border: solid 1px #000000!important;
    font-size: 14px!important;
    font-family: 'Rubik',sans-serif!important;
    color: #000000!important;
    border-radius: 0px!important;
    padding: 12px!important;
    letter-spacing: 0.8px!important;
    width: 100%!important;
    max-width: 100%!important;
    height: 42.5px!important
}

.hs-form input::placeholder,.hs-form textarea::placeholder {
    text-transform: uppercase!important;
    letter-spacing: 1.8px!important
}

.hs-form select {
    padding: 12px 22px 12px 11px!important;
    color: #676767! important;
    font-weight: 400!important;
    letter-spacing: 2.8px!important;
}

.hs-form select option {
    color: #676767!important;
    font-family: 'Rubik',sans-serif!important;
    font-size: 14px!important;
    letter-spacing: 1.8px!important;
    font-weight: 400!important
}

.hs-form select option[disabled][selected] {
    color: #676767!important;
    text-transform: uppercase!important;
    letter-spacing: 1.8px!important
}

/* Изменение высоты поля message такой же, как и у других полей */
.hs-form textarea {
    height: 42.5px!important; /* Такая же высота как у других инпутов */
    font-weight: 400!important;
    resize: none!important; /* Отключаем возможность изменения размера */
    overflow: auto!important; /* Убираем скроллбар если не нужен */
    box-sizing: border-box!important;
    max-width: 100%!important; /* Убеждаемся, что не выходит за пределы блока */
    padding: 10px 12px!important; /* Одинаковый паддинг со всех сторон */
}

.hs-form input:hover,.hs-form input:focus,.hs-form textarea:hover,.hs-form textarea:focus,.hs-form select:hover,.hs-form select:focus {
    border: solid 1px #000000!important;
    outline: none!important
}

.hs-form label {
    font-size: 14px!important;
    color: #000000!important;
    font-weight: normal!important;
    display: block!important;
    text-align: left!important;
    white-space: nowrap!important;
    padding: 5px l
}

.hs-error-msg {
    color: #000000!important;
    font-size: 14px!important;
    text-align: left!important;
    width: 100%!important;
    max-width: 326px!important;
    display: block!important;
    float: none!important;
    list-style: none!important;
    padding-left: 0!important;
    position: absolute!important;
    bottom: -20px!important;
    left: 0!important;
    line-height: 1.4!important;
    padding-bottom: 12px!important;
    margin-bottom: 5px !important;
    
}

.hs-form .hs-error-msgs,.hs-form .hs-error-msgs ul,.hs-form .hs-error-msgs li {
    list-style: none!important;
    padding-left: 0!important;
    margin-left: 0!important;
    line-height: 1.4!important
}

.hs-error-msg::before,.hs-form .hs-error-msgs::before,.hs-form .hs-error-msgs li::before {
    content: none!important
}

.hs-form .hs_submit>div,.hs-form .hs-submit>div,form.hs-form .hs_submit>div,form.hs-form .hs-submit>div {
    display: flex!important;
    justify-content: center!important;
    text-align: center!important;
    float: none!important;
    max-height: 42px!important
}

.hs-form .actions,form.hs-form .actions {
    display: flex!important;
    justify-content: center!important;
    text-align: center!important;
    float: none!important
}

/* 1. Изменение цвета кнопки на синий с красным при наведении */
.hs-form input[type="submit"], 
.hs-form .hs-button,
form.hs-form input[type="submit"], 
form.hs-form .hs-button {
    background-color: #253464!important; /* Темно-синий вместо желтого */
    border: solid 1px #000000!important;
    text-transform: uppercase!important;
    font-size: 16px!important;
    text-align: center!important;
    font-family: 'Rubik',sans-serif!important;
    font-weight: 400!important;
    color: #FFFFFF!important; /* Меняю цвет текста на белый для лучшей читаемости */
    border-radius: 0px!important;
    letter-spacing: 2.3px!important;
    cursor: pointer!important;
    height: 42px!important;
    margin: 0 0 10px 10px!important;
    width: auto!important;
    min-width: 120px!important;
    white-space: nowrap!important;
    padding: 0 35px!important;
    display: flex!important;
    align-items: center!important;
    justify-content: center!important;
    line-height: 1!important
}

/* Красный цвет при наведении (как у флага США) */
.hs-form input[type="submit"]:hover,
.hs-form .hs-button:hover,
form.hs-form input[type="submit"]:hover,
form.hs-form .hs-button:hover {
    background-color: #B22234!important; /* Красный цвет флага США */
    border: solid 1px #000000!important;
    color: #FFFFFF!important
}

/* Убираем "clear: both" для textarea, чтобы оно не начиналось с новой строки */
.hs-form .hs-form-field.hs-fieldtype-textarea {
    width: 50%!important;
    clear: none!important; /* Было both */
    float: right!important; /* Чтобы поле сообщения было справа */
}

.hs-form .hs-error-msgs {
    position: absolute!important;
    margin-top: 2px!important;
    padding-left: 0!important
}

.hs-form input:not([type="checkbox"]):not([type="radio"]),.hs-form textarea,.hs-form select {
    width: 100%!important;
    max-width: 100%!important;
    box-sizing: border-box!important
}

.hs-form form {
    position: relative!important;
    margin: 0 -10px!important;
    width: calc(100% + 20px)!important;
    overflow: hidden!important
}

.hs-form .hs-submit {
    clear: both!important;
    padding: 0 10px!important
}

.hs-form label.hs-error-msg {
    position: relative!important;
    display: block!important;
    margin-top: 3px!important
}

.hs-form .hs-error-msgs {
    position: absolute!important;
    bottom: 0!important;
    left: 10px!important;
    margin: 0!important;
    padding: 0!important;
    list-style-type: none!important;
    width: calc(100% - 20px)!important
}

.hs-form .hs-form-field {
    position: relative!important;
    padding-bottom: 12px!important;
    margin-bottom: 3px!important
}

.hs-form .hs-error-msgs li {
    margin: 0!important;
    padding: 0!important;
    line-height: 1.2!important;
    font-size: 12px!important
}

.hs-form .hs-submit {
    text-align: center!important;
    clear: both!important;
    float: none!important;
    width: auto!important;
    max-width: 400px!important;
    padding: 0px!important
}

.hs-form .actions {
    margin: 0!important;
    padding: 0!important;
    display: inline-block!important;
    width: auto!important
}

.hs-form input[type="text"]::placeholder,.hs-form input[type="email"]::placeholder,.hs-form input[type="tel"]::placeholder,.hs-form input[type="url"]::placeholder,.hs-form input[type="number"]::placeholder,.hs-form input[type="date"]::placeholder,.hs-form textarea::placeholder,.hs-form select::placeholder {
    font-size: 14px!important;
    letter-spacing: 2.8px!important
}

@media screen and (max-width: 768px) {
  /* Stack form fields vertically */
  .hs-form .hs-form-field,
  .hs-form .hs-form-field.hs-fieldtype-select,
  .hs-form .hs-form-field.hs-fieldtype-textarea {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
    padding: 8px 15px !important;
  }
  
  /* Фикс для textarea на мобильных устройствах */
  .hs-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .hs-error-msg {
      color: #ffffff!important;
      font-size: 10px!important;
      text-align: left!important;
      width: 20px !important;
      max-width: 326px!important;
      display: block!important;
      float: none!important;
      list-style: none!important;
      padding-left: 0!important;
      position: absolute!important;
      bottom: -20px!important;
      left: 5%!important;
      line-height: normal!important;
      padding-bottom: 12px!important;
      margin-bottom: -1% !important;
  }
  
  .hs-form input[type="submit"],
  .hs-form .hs-button,
  form.hs-form input[type="submit"],
  form.hs-form .hs-button {
    white-space: normal !important;
    height: auto !important;
    line-height: 1.4 !important;
    padding: 10px 0px !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Container adjustment if needed */
  form.hs-form {
    padding: 0 10px !important;
  }
}

/* --- BUTTON FIX: Align to left --- */
.hs-form .hs-submit,
.hs-form .hs_submit,
.hs-form .actions {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding-right: 100% !important;
    margin-top: 10px !important;
}

/* --- BUTTON: Auto-size and wrap text --- */
.hs-form input[type="submit"],
.hs-form .hs-button {
    width: auto !important;
    max-width: 120% !important;
    height: auto !important;
    padding: 12px 25px !important;
    white-space: normal !important;
    line-height: 1.4 !important;
    display: inline-block !important;
    text-align: center !important;
    word-break: break-word !important;
}

/* --- SELECT FIELD FIX: Allow full placeholder visibility --- */
.hs-form select {
    padding: 10px 11px !important; /* remove the right-side padding */
    text-overflow: ellipsis !important;
    white-space: normal !important;
}

/* Fix placeholder styles */
.hs-form input[type="text"]::placeholder,
.hs-form input[type="email"]::placeholder,
.hs-form input[type="tel"]::placeholder,
.hs-form input[type="url"]::placeholder,
.hs-form input[type="number"]::placeholder,
.hs-form input[type="date"]::placeholder,
.hs-form textarea::placeholder,
.hs-form select::placeholder {
    font-size: 14px !important;
    letter-spacing: 2.8px !important;
}

.hs-form select {
    padding-left: 2.5% !important;
}