@import url("../components/loader.css");

.contacts {
  width: 100%;
  background: var(--white-color);
}

.contacts__wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 282px 0 140px 0;
  contain: layout style paint;
}

.contacts__wrapper h1 {
  font-family: var(--third-family);
  font-weight: 600;
  font-size: clamp(37px, 6.3vw, 64px);
  color: var(--accent-color);
}

.contacts__location {
  max-width: 1360px;
  width: 100%;
  min-height: 650px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--black-color);
  border-radius: 15px;
  gap: 20px;
  padding: 20px;
  margin-top: 140px;
}

.contacts__content {
  display: flex;
  flex-direction: column;
  color: var(--white-color);
  margin-top: auto;
}

.contacts__title {
  display: flex;
  flex-direction: column;
  margin-top: 25px;
}

.contacts__title h2 {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: clamp(24px, 2.5vw, 32px);
}

.contacts__title p {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 16px;
  color: var(--white-color);
}

.contacts__items {
  display: flex;
  align-items: flex-end;
  gap: 85px;
  margin: 50px auto 20px 0;
}

.contacts__list {
  display: flex;
  flex-direction: column;
}

.contacts__list li a {
  font-weight: 600;
}

.contacts__mail {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 16px;
  color: var(--white-color);
}
.map {
  max-width: 700px;
  width: 100%;
  min-height: 250px;
  aspect-ratio: 1 / 1;
  border: 0;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.map iframe {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  border: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.map iframe[src] {
  opacity: 1;
}
.map:empty::after {
  content: "Карта загружается...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gray-color);
  font-size: 14px;
  background: var(--white-color);
  padding: 10px;
  border-radius: 8px;
}
.contacts__blank {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 50px;
}

.contacts__desc {
  max-width: 555px;
  width: 100%;
  color: var(--black-color);
  overflow-wrap: break-word;
  word-break: break-word;
}

.contacts__form {
  display: flex;
  flex-direction: column;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 20px;
  margin-bottom: 36px;
}

.full-width {
  grid-column: span 2;
  gap: 10px;
}

.field-group {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-bottom: 30px;
}

label {
  font-weight: 600;
  font-size: 16px;
  color: var(--black-color);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.3rem 0.9rem;
  border-bottom: 1.5px solid var(--black-color);
  background: var(--white-color);
  font-size: 0.95rem;
  transition: 0.2s;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 100px;
  overflow: hidden;
  text-align: start;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--black-color);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.checkbox-group label {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  color: var(--black-color);
}

.contacts__button {
  margin: 30px 0 0 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: var(--light-grey-color);
}

.button-clip {
  position: absolute;
  right: 0;
  bottom: 10px;
  cursor: pointer;
}

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: var(--white-color);
  color: var(--gray-color);
}
/*===алаптив===*/
@media screen and (max-width: 825px) {
  .contacts__location {
    grid-template-columns: 1fr;
    gap: 60px;
    margin-top: 40px;
  }
  .contacts__content {
    gap: 20px;
  }
  .contacts__title h2 {
    font-size: clamp(24px, 5vw, 32px);
  }
  .contacts__title {
    margin: 0;
    gap: 5px;
  }
  .contacts__items {
    gap: 80px;
    margin: 30px auto 0 0;
  }
  .contacts__blank {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .contacts__desc {
    max-width: 605px;
    margin-left: auto;
  }
}
@media screen and (max-width: 768px) {
  .contacts__wrapper {
    padding: 210px 0 140px 0;
  }
  .form-grid {
    margin-bottom: 40px;
  }
}
@media screen and (max-width: 480px) {
  .contacts__wrapper {
    padding: 160px 0 90px 0;
  }
  .contacts__title p {
    font-weight: 500;
  }
  .contacts__items {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin: 20px auto 0 0;
  }
  .contacts__location {
    margin-top: 90px;
  }
  .form-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
  .full-width {
    grid-column: span 1;
  }
  .submit-btn {
    width: 100%;
    margin: 0;
  }
  .checkbox-group {
    align-items: flex-start;
  }

  .checkbox-group label {
    font-size: 14px;
  }
  .checkbox-group input {
    margin-top: 10px;
  }
  .contacts__button {
    width: 100%;
    margin-top: 30px;
  }
}
