.form-main {
  background-color: var(--dark-blue);
  position: relative;
  z-index: 1;
}

.form-submited {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  background-color: inherit;
  display: flex;
}

.inner-thanks {
  background-color: var(--white);
  max-width: 870px;
  min-height: 544px;
  width: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 127px;
}

.inner-thanks p {
  font-family: "BR Sonoma";
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 30px;
  text-align: center;
  color: #75828a;
  margin-top: 20px;
  margin-bottom: 30px;
}

.form-main article {
  transition: all 0.3s;
  max-width: 870px;
}

.form-main .form {
  background-color: var(--white);
  padding: 103px 140px 140px 90px;
  margin-bottom: 60px;
}

.form-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 112px;
  padding-bottom: 60px;
  position: relative;
}

.form h2 {
  text-align: center;
  margin-bottom: 96px;
}

.text-section {
  background-color: var(--white);
  padding: 62px 150px 62px 150px;
}

.form-part {
  display: flex;
  flex-direction: column;
  gap: 41px;
}

.form-part:not(:last-of-type) {
  margin-bottom: 60px;
}

.form-part h3 {
  margin-bottom: 7px;
}

.text-section p {
  margin: 0;
  font-family: "BR Sonoma";
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  line-height: 20px;
  color: var(--grey);
}

.input {
  /* height: 37px; */
  height: fit-content;
  min-height: 37px;
  position: relative;
}

.input label {
  font-family: "BR Sonoma";
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 30px;
  color: var(--grey);
  position: absolute;
  bottom: 7px;
  top: 0;
  left: 0;
  user-select: none;
  pointer-events: none;
  transition: all 0.3s ease;
}

.input input {
  outline: none;
  border: none;
  font-family: "BR Sonoma";
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 30px;
  padding: 0;
  width: 100%;
}

.input .line {
  transition: all 0.3s ease;
  position: absolute;
  left: 0;
  /* bottom: 0; */
  top: 37px;
  width: 100%;
  height: 0;
  border-bottom: 1.5px solid var(--grey);
}

.input input:disabled ~ .line {
  border-bottom: 1.5px solid var(--grey) !important;
  opacity: 0.3;
}

.input input:disabled ~ label {
  opacity: 0.3;
  color: var(--grey) !important;
}

.input input:hover ~ label {
  color: var(--dark-blue);
}

.input input:focus ~ .line,
.input input:hover ~ .line {
  border-bottom: 1.5px solid var(--dark-blue);
}

.input input:not(:placeholder-shown) ~ label,
.input input:focus ~ label {
  top: -29px;
  font-size: 13px;
  color: var(--grey);
}

.input-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 31px 41px;
}

h4 {
  font-family: "BR Sonoma";
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 30px;
  margin: 0;
}

.extra-group h4 {
  margin-bottom: 17px;
}

.check-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 29px 0;
}

.custom-select-opener {
  background: var(--white);
  font-family: "BR Sonoma";
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 35px;
  padding: 0;
}

.customSelect.is-open ~ label,
.customSelect.value-selected ~ label {
  top: -29px;
  font-size: 13px;
  color: var(--grey);
}

.custom-select-container.is-open .custom-select-panel {
  opacity: 1;
  pointer-events: initial;
  user-select: initial;
}

.custom-select-container .custom-select-opener {
  outline: none;
}

.custom-select-panel {
  border: 1.5px solid var(--dark-blue);
  top: calc(100% + 14px);
  background-color: var(--white);
  padding: 16px 30px 19px 30px;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: max-height 0.5s ease-out, overflow-y 0.1s 0.5s,
    opacity 0.3s ease-in-out;
}

.custom-select-option {
  font-family: "BR Sonoma";
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 35px;
  color: var(--dark-blue);
  padding: 0;
}

.custom-select-option:hover,
.custom-select-option.has-focus {
  background-color: rgba(117, 130, 138, 0.3);
}

.custom-select-option.is-selected {
  background-color: var(--dark-blue);
  color: var(--white);
}

.custom-select-option:first-of-type {
  display: none;
}

.custom-select-option.is-selected::before {
  display: none;
}

.input .customSelect:focus ~ .line,
.input .customSelect:hover ~ .line {
  border-bottom: 1.5px solid var(--dark-blue);
}

.input .customSelect:hover ~ label {
  color: var(--dark-blue);
}

.input-select .dropdown-arrow {
  position: absolute;
  right: 0;
  /* bottom: 16px; */
  top: 16px;
  width: 12px;
  height: 6px;
}

.input-select .dropdown-arrow img {
  position: inherit;
  transition: all 0.3s ease;
}

.input .customSelect.is-open ~ .dropdown-arrow img {
  transform: rotate(180deg);
}

.input .customSelect:hover ~ .dropdown-arrow img {
  filter: brightness(0) saturate(100%) invert(11%) sepia(91%) saturate(1337%)
    hue-rotate(174deg) brightness(96%) contrast(102%);
}

/* checkbox */

.form-control {
  font-family: "BR Sonoma";
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 30px;
  display: grid;
  grid-template-columns: 24px auto;
  gap: 13px;
  color: var(--grey);
  transition: all 0.3s ease;
  align-items: center;
  cursor: pointer;
}

.form-control:hover,
.form-control:focus {
  color: var(--dark-blue);
}

/* .form-control + .form-control {
  margin-top: 1em;
} */

.form-control--disabled {
  color: var(--form-control-disabled);
  cursor: not-allowed;
}

input[type="checkbox"] {
  /* Add if not using autoprefixer */
  -webkit-appearance: none;
  /* Remove most all native input styles */
  appearance: none;
  /* For iOS < 15 */
  background-color: var(--form-background);
  /* Not removed via appearance */
  margin: 0;

  font: inherit;
  color: var(--grey);
  width: 24px;
  height: 24px;
  border: 1.5px solid currentColor;
  transform: translateY(-0.075em);

  display: grid;
  place-content: center;
  transition: all 0.3s ease;
}

input[type="checkbox"]::before {
  content: "";
  width: 11px;
  height: 11px;
  /* clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); */
  clip-path: polygon(6% 55%, 0 63%, 50% 99%, 100% 16%, 91% 10%, 47% 83%);
  transform: scale(0);

  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--form-control-color);
  /* Windows High Contrast Mode */
  background-color: CanvasText;
}

input[type="checkbox"]:checked::before {
  transform: scale(1);
  background-color: var(--beige);
}

input[type="checkbox"]:checked {
  background-color: var(--dark-blue);
  border-color: var(--dark-blue);
}

input[type="checkbox"]:focus,
input[type="checkbox"]:hover {
  color: var(--dark-blue);
}

input[type="checkbox"]:disabled {
  --form-control-color: var(--form-control-disabled);

  color: var(--form-control-disabled);
  cursor: not-allowed;
}

/* radio button */
/* The container */
.radio-container {
  display: block;
  position: relative;
  padding-left: calc(24px + 12px);
  cursor: pointer;
  font-family: "BR Sonoma";
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 30px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  color: var(--grey);
  transition: all 0.3s ease;
}

/* Hide the browser's default radio button */
.radio-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Create a custom radio button */
.radio-container .checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 24px;
  width: 24px;
  background-color: var(--white);
  border: 1.5px solid var(--grey);
  border-radius: 50%;
  transition: all 0.3s ease;
}

/* On mouse-over, add a grey background color */
.radio-container:hover input ~ .checkmark {
  border-color: var(--dark-blue);
}

.radio-container:hover {
  color: var(--dark-blue);
}

/* When the radio button is checked, add a blue background */
.radio-container input:checked ~ .checkmark {
  background-color: var(--dark-blue);
}

/* Create the indicator (the dot/circle - hidden when not checked) */
.radio-container .checkmark:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

/* Show the indicator (dot/circle) when checked */
.radio-container input:checked ~ .checkmark:after {
  display: block;
}

/* Style the indicator (dot/circle) */
.radio-container .checkmark:after {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--beige);
}

.grid2-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.grid2-group > .input {
  max-width: 280px;
}

.grid2-group .radio-group {
  display: flex;
  flex-direction: row;
  gap: 50px;
}

.form-part.last-part {
  gap: 13px;
}

.form-part.last-part .form-control {
  font-size: 13px;
  line-height: 20px;
  gap: 0 13px;
}

.form-part.last-part .form-control input {
  align-self: baseline;
  margin-top: 4px;
}

a.back-link {
  padding: 0;
  text-decoration: none;
  color: var(--white);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;

  font-family: "BR Sonoma";
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
  line-height: 30px;
  transition: all 0.3s ease;
}

a.back-link:hover {
  text-shadow: 0px 0px 3px rgb(255 255 255);
}

a.back-link .icon-arrow {
  transform: rotate(180deg);
}

a.back-link .icon-arrow::before {
  color: var(--white);
  font-size: 0.7em;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

.btn[type="submit"] {
  border: none;
  margin-left: auto;
  margin-top: 64px;
}

.btn[type="submit"] .icon-arrow::before {
  color: var(--dark-blue);
}

.just-validate-error-label {
  font-size: 12px;
  font-family: "BR Sonoma";
  font-style: normal;
  font-weight: 300;
  line-height: 12px;

  position: relative;
  bottom: -12px;
}

#subject-group {
  position: relative;
}

#subject-group .just-validate-error-label {
  bottom: 14px;
  grid-column: 1 / 3;
}

.just-validate-error-field ~ .line {
  border-color: rgb(184, 17, 17) !important;
}

.just-validate-error-field ~ .line::after {
  content: "";
  height: 14px;
}

.input-select .just-validate-error-label {
  bottom: -8px;
}

.form-control.agreement {
  position: relative;
}

.form-control.agreement .just-validate-error-label {
  grid-column: 1/3;
  bottom: -3px;
}

input[type="checkbox"].just-validate-error-field {
  border-color: rgb(184, 17, 17);
}

.agreement-text {
  position: relative;
  max-height: 100px;
  overflow: hidden;
  transition: all 180ms ease-in-out;
  padding-right: 20px;
}

.agreement-text .dropdown-arrow {
  position: absolute;
  bottom: 5px;
  right: 5px;
  transition: all 0.3s ease;
}
.agreement-text .dropdown-arrow img {
  transition: all 0.3s ease;
  /* transform: rotate(180deg); */
}

.agreement-text .dropdown-arrow img:hover {
  filter: brightness(0) saturate(100%) invert(11%) sepia(91%) saturate(1337%)
    hue-rotate(174deg) brightness(96%) contrast(102%);
}

.agreement-text.closed {
  max-height: 40px;
}

/* .agreement-text.closed img {
  transform: rotate(0deg);
} */

.star-thanks {
  position: absolute;
  top: 210px;
  left: 5%;
}

.sun-thanks {
  position: absolute;
  top: 520px;
  right: 5%;
}

.star-img {
  position: absolute;
  top: 350px;
  left: 5%;
}

.sun-img {
  position: absolute;
  bottom: 434px;
  left: 3%;
}

.flag-img {
  position: absolute;
  top: 50%;
  right: 6%;
}

#form-submited {
  z-index: -1;
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

#form-submited.sent {
  z-index: 2;
  opacity: 1;
}

.form-send-error {
  text-align: right;
  color: rgb(184, 17, 17);
  font-family: "BR Sonoma";
  font-style: normal;
  font-weight: 300;
  line-height: 120%;
}

.creator-info {
  grid-column: 4;
  font-size: 0.8em !important;
}

.creator-info a {
  text-decoration: none;
  color: inherit;
}

@media screen and (max-width: 1500px) {
  .inner-thanks p {
    font-size: 16px;
    line-height: 28px;
  }
  .inner-thanks {
    max-width: 768px !important;
    min-height: 530px;
  }

  .star-thanks {
    position: absolute;
    width: 122px;
    height: 122px;
    left: 2%;
  }

  .sun-thanks {
    position: absolute;
    width: 158px;
    height: 80px;
    right: 2%;
  }

  .star-img {
    position: absolute;
    width: 122px;
    height: 122px;
    left: 2%;
  }

  .sun-img {
    position: absolute;
    width: 158px;
    height: 80px;
    left: 2%;
    bottom: 350px;
  }

  .flag-img {
    position: absolute;
    width: 133px;
    height: 75px;
    right: 3%;
  }
}
@media screen and (max-width: 1250px) {
  .star-img,
  .sun-img,
  .flag-img {
    display: none;
  }
}
@media screen and (max-width: 1100px) {
  .form-section {
    padding-top: 20px;
  }
  .form-main article {
    transition: all 0.3s;
    width: 100%;
    max-width: unset;
    padding: 0 20px;
  }
  .form-main .form {
    padding: 77px 56px 60px 56px;
  }

  .input input,
  .input label,
  .form-control,
  .radio-container {
    font-size: 16px;
  }

  .input {
    min-height: 34px;
  }
  .input .line {
    top: 34px;
  }

  h2 {
    font-size: 35px;
    line-height: 50px;
    margin-bottom: 70px;
  }

  h4 {
    font-size: 17px;
  }

  .form-part h3 {
    margin-bottom: -15px;
  }

  .text-section {
    padding: 54px 40px 54px 40px;
  }

  .form-submited {
    padding: 0 20px;
    padding-top: 20px;
  }

  .inner-thanks {
    width: 100%;
    max-width: unset;
    min-height: unset;
    /* height: 800px; */
    height: calc(100vh - 40px);
  }

  .star-thanks {
    display: none;
  }

  .sun-thanks {
    display: none;
  }

  .creator-info {
    grid-column: 2;
    grid-row: 4;
  }
}

@media screen and (max-width: 670px) {
  .form h2 {
    font-size: 22px;
    line-height: 29px;
    margin-bottom: 32px;
  }
  .form-part h3 {
    margin-bottom: -9px;
  }
  .extra-group h4 {
    font-size: 15px;
  }
  .custom-select-option {
    font-size: 15px;
  }
  .custom-select-panel {
    padding: 20px;
  }
  .input input,
  .input label,
  .form-control,
  .radio-container {
    font-size: 15px;
  }
  .form-part:not(:last-of-type) {
    gap: 34px;
  }
  .input-group {
    gap: 34px;
    grid-template-columns: 1fr;
  }
  .form-part:not(:last-of-type) {
    margin-bottom: 52px;
  }
  .check-group {
    display: flex;
    flex-direction: column;
  }
  .grid2-group {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .grid2-group .radio-group > * {
    flex: 1 1 50%;
  }
  .form-part.last-part .form-control input {
    margin-top: 3px;
  }
  .form-part.last-part .form-control {
    font-size: 10px;
    line-height: 16px;
  }
  .agreement-text.closed {
    max-height: 32px;
  }
  .form-section {
    padding-bottom: 30px;
  }
  .form-main .form {
    padding: 52px 25px 40px 25px;
    margin-bottom: 30px;
  }
  .btn[type="submit"] {
    margin-top: 36px;
  }
  a.back-link {
    font-size: 14px;
  }
  a.back-link .icon-arrow::before {
    font-size: 0.6em;
  }
  .text-section {
    padding: 40px 20px 40px 20px;
  }
  .inner-thanks {
    padding: 0 42px !important;
  }

  .inner-thanks h3 {
    font-size: 22px;
    line-height: 29px;
  }

  .inner-thanks p {
    margin-top: 22px;
    margin-bottom: 34px;
    font-size: 15px;
    line-height: 23px;
  }

  .form-send-error {
    font-size: 15px;
  }

  .creator-info {
    grid-column: unset;
    grid-row: unset;
  }
}
