/*
 * Страницы Terms of Use, Contact Us и Restore Order.
 *
 * Заголовок страницы, кнопки и чёрный блок берём у сайта (index.css:
 * .section-title, .id-text, .btn, .black-block) — здесь только карточки,
 * типографика текста и форма восстановления заявки.
 */

/* длинную строку неудобно читать — колонка страницы уже контейнера */
.yx-page .section-inner {
  margin: 0 auto;
  max-width: 960px;
}

.yx-page .section-inner > .id-text {
  margin-bottom: 40px;
  text-align: center;
}

.yx-card {
  background-color: #f8f9fa;
  border-radius: 1rem;
  padding: 3rem;
}

@media (max-width: 768px) {
  .yx-card {
    padding: 2rem;
  }
}

@media (max-width: 576px) {
  .yx-card {
    padding: 1.5rem;
  }
}

/* --- текст соглашения --------------------------------------------------- */

.yx-legal {
  color: #1f2937;
  font-size: 15px;
  line-height: 26px;
}

.yx-legal h5 {
  color: #0b163f;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 32px 0 12px;
}

.yx-legal h5:first-child {
  margin-top: 0;
}

.yx-legal p {
  margin-bottom: 14px;
}

.yx-legal ul {
  list-style: disc;
  margin: 0 0 16px 18px;
  padding-left: 16px;
}

.yx-legal li {
  margin-bottom: 8px;
}

/* кнопке цвет ссылки не нужен — у .btn он белый на синем фоне */
.yx-legal a:not(.btn) {
  color: #175cff;
  text-decoration: underline;
}

.yx-legal .yx-note {
  background: #fff;
  border-left: 3px solid #175cff;
  border-radius: 8px;
  margin-top: 32px;
  padding: 16px 20px;
}

.yx-legal .yx-updated {
  color: #6b7280;
  font-size: 14px;
  margin: 16px 0 0;
}

/* --- контакты ----------------------------------------------------------- */

/* карточки контактов: по две в ряд, но пустые (скрытые админкой) строки
   не оставляют дыр — видимая карточка растягивается на всю ширину */
.yx-contacts {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 20px;
}

.yx-contact {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 calc(50% - 10px);
  flex: 1 1 calc(50% - 10px);
  min-width: 280px;
  background-color: #f8f9fa;
  border-radius: 1rem;
  padding: 24px 28px;
}

@media (max-width: 768px) {
  .yx-contact {
    -ms-flex: 1 1 100%;
    flex: 1 1 100%;
    min-width: 0;
  }
}

.yx-contact .bold {
  color: #6b7280;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.yx-contact__value,
.yx-contact__value p {
  color: #0b163f;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-all;
}

a.yx-contact__value:hover,
a.yx-contact__value:hover p {
  color: #175cff;
}

.yx-contacts-note {
  margin-top: 30px;
}

/* --- восстановление заявки ---------------------------------------------- */

.yx-restore__form {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-align: end;
  -ms-flex-align: end;
  align-items: flex-end;
  gap: 20px;
}

.yx-restore__form .input-wrapper {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 320px;
  flex: 1 1 320px;
}

.yx-restore__form .input-wrapper p {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 8px;
}

.yx-restore__form input {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #0b163f;
  font-size: 15px;
  height: 58px;
  padding: 0 16px;
  width: 100%;
}

.yx-restore__form input:focus {
  border-color: #175cff;
  outline: none;
}

.yx-restore__form .btn {
  border: none;
}

@media (max-width: 576px) {
  .yx-restore__form input {
    height: 45px;
  }
}

.yx-restore__error {
  color: #f25767;
  font-size: 14px;
  margin: 14px 0 0;
}

.yx-restore__hint {
  color: #6b7280;
  font-size: 14px;
  line-height: 22px;
  margin: 16px 0 0;
}

.yx-restore + .yx-legal {
  margin-top: 30px;
}

/* --- форма обращения в поддержку (страница контактов) -------------------- */

.yx-ticket {
  margin-top: 30px;
}

.yx-ticket h5 {
  color: #0b163f;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px;
}

.yx-ticket__lead {
  color: #1f2937;
  font-size: 15px;
  line-height: 26px;
  margin-bottom: 24px;
}

.yx-ticket__form {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 20px 1fr;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
}

@media (max-width: 768px) {
  .yx-ticket__form {
    -ms-grid-columns: 1fr;
    grid-template-columns: 1fr;
  }
}

/* сообщение и кнопка занимают всю ширину карточки */
.yx-ticket__form .input-wrapper--wide,
.yx-ticket__form .btn {
  grid-column: 1 / -1;
}

.yx-ticket__form .input-wrapper p {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 8px;
}

.yx-ticket__form .input-wrapper p span {
  font-weight: 400;
  opacity: 0.75;
}

.yx-ticket__form input,
.yx-ticket__form textarea {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #0b163f;
  font-family: inherit;
  font-size: 15px;
  padding: 0 16px;
  width: 100%;
}

.yx-ticket__form input {
  height: 58px;
}

.yx-ticket__form textarea {
  display: block;
  line-height: 24px;
  min-height: 150px;
  padding: 16px;
  resize: vertical;
}

.yx-ticket__form input:focus,
.yx-ticket__form textarea:focus {
  border-color: #175cff;
  outline: none;
}

.yx-ticket__form .btn {
  border: none;
}

.yx-ticket__form .btn[disabled] {
  cursor: default;
  opacity: 0.6;
}

@media (max-width: 576px) {
  .yx-ticket__form input {
    height: 45px;
  }
}

/* ответ сервера: ошибка — красным, принятое обращение — зелёным */
.yx-ticket__status {
  color: #f25767;
  font-size: 14px;
  line-height: 22px;
  margin: 14px 0 0;
}

.yx-ticket__status[data-yx-ticket-ok] {
  color: #1ea97c;
}

.yx-ticket__hint {
  color: #6b7280;
  font-size: 14px;
  line-height: 22px;
  margin: 16px 0 0;
}
