@import url("../components/loader.css");

.calculate {
  width: 100%;
  background: var(--white-color);
}

.calculate__wrapper {
  display: flex;
  flex-direction: column;
  padding: 281px 0 140px 0;
}

.calculate__wrapper h1 {
  font-weight: 700;
  color: var(--accent-color);
  text-align: center;
}

.calculate__form {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-items {
  display: grid;
  grid-template-columns: minmax(auto, 1fr) minmax(480px, 1fr);
  gap: 20px;
}

.form-items:last-child {
  border-top: 1.5px solid var(--black-color);
}

.form-title {
  display: flex;
}

.form-title h2 {
  font-family: var(--third-family);
  font-weight: 700;
  font-size: clamp(29px, 4.8vw, 48px);
  color: var(--black);
}

.form-groups {
  max-width: 670px;
  width: 100%;
  display: flex;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  max-width: 325px;
  width: 100%;
}

.form-group label {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 16px;
  color: var(--black-color);
}
select,
::picker(select) {
  appearance: base-select;
  border: none;
}

select:focus {
  outline: none;
}

option::checkmark {
  content: "";
}

select {
  border-radius: 0;
  border-bottom: 1.5px solid var(--black-color);
}

select::picker-icon {
  content: url("../../icons/picker-icon.svg");
  padding-right: 5px;
  transition: 0.4s rotate;
}

select:open::picker-icon {
  rotate: 180deg;
}

::picker(select) {
  opacity: 0;
  transition: all 0.4s allow-discrete;
}
:open::picker(select) {
  opacity: 1;
}

#langFrom::picker(select) {
  height: 300px;
  overflow: auto;
  background: var(--white-color);
}

::picker(select)::-webkit-scrollbar {
  width: 0;
}

option {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  color: var(--black-color);
  padding: 5px 0 5px 0;
}

option:hover {
  background: var(--light-grey-color);
}

option:checked {
  background: var(--light-grey-color);
}

option:first-of-type {
  margin-top: 5px;
}

.form-document {
  max-width: 670px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 25px;
}

.form-select {
  gap: 6px;
}

.wide-group {
  max-width: 670px;
  width: 100%;
}

.wide-group select {
  padding: 10px 0;
  margin-top: 24px;
}

.wide-group input {
  padding: 5px;
  border-bottom: 1.5px solid var(--black-color);
}

.wide-group h3 {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 16px;
  color: var(--black-color);
}
.group-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.group-item.group-item_type_center {
  align-items: flex-start;
  margin-top: 15px;
}
.group-item p {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  color: var(--black-color);
}

input[type="radio"] {
  accent-color: var(--accent-color);
  width: 20px;
  height: 20px;
  display: flex;
  flex-shrink: 0;
}

.add-services {
  align-items: center;
}

.form-result {
  display: flex;
  flex-direction: column;
  margin-top: 50px;
}

.form-result h3 {
  font-family: var(--third-family);
  font-weight: 700;
  font-size: clamp(29px, 2.57vw, 37px);
  color: var(--accent-color);
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.price-display {
  font-family: var(--third-family);
  font-weight: 700;
  font-size: 37px;
  text-align: right;
  color: var(--black-color);
}

.price-display.error {
  color: red;
  font-weight: bold;
}

.price-note {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  color: var(--black-color);
  margin-top: 20px;
}

.calculate-button {
  margin: 30px 0 0 auto;
}

/*===sending===*/
input,
textarea {
  padding: 0.3rem;
}
#sending {
  background: rgba(0, 0, 0, 0.5);
}

.sending {
  max-width: 711px;
  width: 100%;
  height: 95%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 20px 0 rgba(110, 110, 110, 0.25);
  background: var(--white-color);
}
.sending::-webkit-scrollbar {
  width: 0;
}
.sending h2 {
  font-family: var(--third-family);
  font-weight: 700;
  font-size: 37px;
  color: var(--accent-color);
}

.sending__form {
  display: flex;
  flex-direction: column;
}
.contacts {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.sending__form h3 {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 32px;
  color: var(--black-color);
}

.contacts__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 20px;
}

.contacts__item {
  display: flex;
  flex-direction: column;
}
.contacts__item label {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 16px;
  color: var(--black-color);
}

.contacts__item input {
  height: 30px;
  border-bottom: 1.5px solid var(--black-color);
}

.amendment {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}
.amendment h3 {
  margin-bottom: 20px;
}
.amendment__item {
  display: flex;
  flex-direction: column;
  margin-bottom: 30px;
  position: relative;
}

.amendment__item h4 {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 24px;
  color: var(--black-color);
}

.amendment__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  margin-top: 20px;
}
.grid-rate {
  row-gap: 15px;
}
.amendment__lang {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.amendment__lang label {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 16px;
  color: var(--black-color);
}
.amendment__column {
  display: flex;
  flex-direction: column;
  margin-top: 47px;
}
.amendment__column-other {
  display: flex;
  flex-direction: column;
  margin-top: 30px;
  border-bottom: 1.5px solid var(--black-color);
}
.amendment__column-other label {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 16px;
  color: var(--black-color);
}
.amendment__column-other input {
  height: 30px;
}
.amendment__radio {
  display: flex;
  align-items: center;
  gap: 15px;
}
.amendment__radio p {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  color: var(--black-color);
}

.amendment__radio:last-child {
  align-items: flex-start;
}
textarea {
  resize: vertical;
  min-height: 107px;
  overflow: hidden;
  text-align: start;
  padding: 0.3rem;
  border-bottom: 1.5px solid var(--black-color);
}
.button-clip {
  position: absolute;
  right: 0;
  bottom: 10px;
  cursor: pointer;
}
.sending__privacy {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.sending__privacy label {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  color: var(--black-color);
}
.sending__privacy label a {
  color: var(--accent-color);
}

.submit-btn {
  margin-left: auto;
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.submit-btn:enabled {
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
}
option:hover {
  background-color: #dedede;
}

.button-clip {
  position: absolute;
  right: 0;
  bottom: 10px;
  cursor: pointer;
}

/* Стили для ошибок валидации */
.error-border {
  border-bottom: 1.5px solid #e74c3c;
  outline: none;
}

.error-message {
  position: absolute;
  color: #e74c3c;
  font-size: 12px;
  bottom: -20px;
}

input[type="checkbox"] {
  appearance: none;
}

input[type="checkbox"] {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--black-color);
  color: var(--accent-color);
  padding: 0;
  flex-shrink: 0;
}

input[type="checkbox"]::before {
  content: "";
  position: absolute;
  visibility: hidden;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 50%;
  background-color: var(--accent-color);
}

input[type="checkbox"]:checked {
  border: 1px solid var(--accent-color);
}

input[type="checkbox"]:checked::before {
  visibility: visible;
}

input[type="checkbox"]:disabled {
  border-color: var(--black-color);
  background: #dddddd;
  color: var(--gray-color);
}
.sending__burtton {
  margin-top: 50px;
  align-self: flex-end;
}
@media (max-width: 760px) {
  .sending {
    max-width: 343px;
  }
  .contacts__inner {
    grid-template-columns: 1fr;
    gap: 19px;
  }
  .amendment__grid {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }
  .sending h2 {
    text-align: center;
  }
  .sending__form h3 {
    font-size: 24px;
  }
  .amendment {
    margin-top: 50px;
  }
  .amendment h3 {
    margin-bottom: 30px;
  }
  .amendment__item h4 {
    max-width: 160px;
    font-size: 20px;
  }
  .amendment__column-other {
    margin-top: 20px;
  }
  .amendment__radio_type_end {
    orphans: 2;
  }
  .amendment__radio_type_center {
    order: 3;
  }
  .sending__privacy {
    align-items: flex-start;
  }
  .amendment__item:last-child {
    margin-bottom: 0;
  }
  .sending__privacy label {
    font-size: 14px;
  }
  .sending__privacy input {
    margin-top: 15px;
  }
  .sending__burtton {
    margin-top: 35px;
  }
}
/*===адаптив===*/
@media screen and (max-width: 959px) {
  .form-items {
    grid-template-columns: minmax(auto, 232px) minmax(480px, 1fr);
  }
}
@media screen and (max-width: 768px) {
  .calculate__wrapper {
    padding: 210px 0 140px 0;
  }
  .form-groups {
    flex-direction: column;
  }
  .form-items:first-child .form-groups {
    flex-direction: row;
  }
  .form-items:first-child .form-title {
    align-items: end;
  }
  .result-item {
    flex-direction: column;
    align-items: flex-end;
  }
  .form-document {
    margin-top: 25px;
  }
  .wide-group select {
    margin-top: 30px;
  }
  .rate-groups {
    margin-top: 15px;
  }
  .form-result {
    margin-top: 20px;
  }
  .result-item {
    gap: 10px;
  }
}
@media (max-width: 745px) {
  .form-items {
    grid-template-columns: 1fr;
  }
  .form-groups,
  .form-items:first-child .form-groups {
    flex-direction: column;
  }
  .form-group {
    max-width: 100%;
  }
  .form-document {
    margin-top: 0;
  }
  .rate-groups {
    margin-top: 0;
  }
  .group-item.group-item_type_center {
    margin-top: 20px;
  }
  .form-result {
    margin-top: 0;
  }
  .calculate-button {
    width: 100%;
  }
}
@media screen and (max-width: 480px) {
  .submit-btn {
    width: 100%;
    margin: 0;
  }
  .sending__burtton {
    margin-top: 35px;
  }
}
@media screen and (max-width: 400px) {
  .calculate__wrapper {
    padding: 160px 0 90px 0;
  }
}
