/* ==========================================================================
   Страница «Пользователю» (support.html). Подключается после style.css.
   ========================================================================== */

/* --- Белое подчёркивание для ссылок на тёмном фоне ----------------------- */

.link--text-white {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: left 0 bottom 0;
  animation: line-out-text-white .4s;
}
.link--text-white:hover,
.link--text-white:focus-visible {
  background-image: linear-gradient(to right, #fff, #fff);
  background-size: 100% 2px;
  outline: none;
  animation: line-in-text-white .4s;
}

@keyframes line-in-text-white {
  0% { background-image: linear-gradient(to right, #fff, #fff); background-size: 0 2px; }
  100% { background-image: linear-gradient(to right, #fff, #fff); background-size: 100% 2px; }
}
@keyframes line-out-text-white {
  0% { background-image: linear-gradient(to right, #fff, #fff); background-size: 100% 2px; }
  100% { background-image: linear-gradient(to right, #fff, #fff); background-size: 0 2px; }
}

/* --- Вкладки ------------------------------------------------------------- */

.tabs {
  position: relative;
  display: flow-root; /* отступы вложенных блоков не «выпадают» наружу */
  margin: 42px 0 22px;
}

.tabs__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 0 -8px 0 -4px;
}

.tabs__btn {
  display: block;
  margin: 0 4px 8px;
  padding: 9px 15px 13px;
  font-size: 1rem;
  line-height: 1.5rem;
  border: 1px solid rgba(10, 20, 40, .24);
  border-radius: 2px;
  transition: color .2s ease-in, background-color .2s ease-in, border-color .2s ease-in;
}
.tabs__btn:hover,
.tabs__btn:focus-visible {
  background-color: rgba(10, 20, 40, .06);
  transition-timing-function: ease-out;
}
.tabs__btn--current,
.tabs__btn--current:hover,
.tabs__btn--current:focus-visible {
  color: var(--c-white);
  background-color: var(--c-navy);
  border-color: var(--c-navy);
}

.tabs__content { animation: showTab .4s ease-in; }
.tabs__content[hidden] { display: none; }
.tabs__content:last-child { margin-bottom: 55px; }

@keyframes showTab {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: none; }
}

@media (max-width: 1199px) {
  .tabs { margin: 40px 0 13px; }
}
@media (max-width: 767px) {
  .tabs { margin: 15px 0 8px; }
  .tabs__controls { margin-bottom: -8px; }
  .tabs__btn { padding: 9px 9px 11px; font-size: .75rem; line-height: 1.125rem; }
}

/* --- Пошаговые инструкции ------------------------------------------------ */

.support__instructions-block { margin: 32px 0; }
.support__instructions-block:last-child { margin-top: 42px; margin-bottom: 58px; }
.support__instructions-block--registration,
.support__instructions-block--registration:last-child { margin-top: 66px; }
.support__instructions-block a { padding-bottom: 9px; }

.support__tabs-caption {
  margin: 0 0 31px;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.support__instructions {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.support__instructions--connection {
  justify-content: space-between;
  max-width: 900px;
  margin-top: 30px;
}

.support__step {
  position: relative;
  width: 224px;
  margin-right: 8px;
}
/* Соединительная линия между шагами */
.support__step::after {
  content: "";
  position: absolute;
  top: 40px;
  right: 0;
  display: block;
  width: calc(100% - 88px);
  height: 1px;
  background-color: rgba(10, 20, 40, .24);
}
.support__step:last-child { width: 200px; margin-right: 0; }
.support__step:last-child::after { display: none; }

.support__step-task {
  max-width: 200px;
  margin: 0;
  padding-top: 112px;
  font-size: 1rem;
  line-height: 1.5rem;
}

.support__icon { position: absolute; display: block; }
.support__icon--smartphone-wifi { top: 0; left: 18px; }
.support__icon--address-input { top: 20px; left: 0; }
.support__icon--phone-call { top: 11px; left: 11px; }
.support__icon--phone-number { top: 20px; left: 0; }
.support__icon--phone-message { top: 0; left: 7px; }
.support__icon--wifi { top: 8px; left: -1px; }
.support__icon--items-list { top: 12px; left: 1px; }
.support__icon--enter-btn { top: 7px; left: 0; }
.support__icon--browser-wifi { top: 9px; left: -1px; }
.support__icon--app { top: 0; left: 0; }

.support__br--phone-num { display: none; }

.support__tabs-text { max-width: 880px; margin: 0 0 64px; }

@media (max-width: 1199px) {
  .support__instructions-block,
  .support__instructions-block:last-child { margin: 0; }
  .support__instructions-block:first-of-type { margin-top: 40px; }
  .support__instructions-block--text { margin-bottom: 50px; }

  .support__instructions { flex-wrap: wrap; }
  .support__step { width: 34.15%; margin-bottom: 63px; }
  .support__step:nth-child(3n) { width: 29.2%; margin-right: 0; }
  .support__step:nth-child(3n)::after { display: none; }

  .support__instructions--connection .support__step,
  .support__instructions--connection .support__step:nth-child(3n) { width: 24.55%; margin-right: .89%; }
  .support__instructions--connection .support__step:nth-child(3n)::after { display: block; }
  .support__instructions--connection .support__step:nth-child(4n),
  .support__instructions--connection .support__step:last-child { width: 22.32%; margin-right: 0; }
  .support__instructions--connection .support__step:nth-child(4n)::after,
  .support__instructions--connection .support__step:last-child::after { display: none; }

  .support__icon--address-input { top: 19px; left: -1px; }
  .support__icon--phone-call { left: 10px; }
  .support__icon--phone-message { top: 1px; left: 6px; }
  .support__icon--wifi { top: 9px; left: -2px; }

  .support__br--phone-num { display: block; }
}

@media (max-width: 767px) {
  .support__instructions-block--registration,
  .support__instructions-block--registration:last-child { margin-top: 32px; }

  .support__step { width: 32.36%; margin-right: 2.45%; margin-bottom: 32px; }
  .support__step::after { width: calc(100% - 48px); top: 20px; }
  .support__step:nth-child(3n) { width: 30.32%; }
  .support__step:last-child,
  .support__step:nth-last-child(2),
  .support__step:nth-last-child(3) { margin-bottom: 15px; }

  .support__step-task {
    max-width: 105px;
    padding-top: 48px;
    font-size: .75rem;
    line-height: 1.0625rem;
  }

  .support__icon--smartphone-wifi { width: 22px; height: 40px; }
  .support__icon--address-input { top: 10px; width: 40px; height: 21px; }
  .support__icon--phone-call { top: 7px; width: 29px; height: 29px; }
  .support__icon--phone-number { top: 11px; width: 40px; height: 21px; }
  .support__icon--phone-message { width: 33px; height: 40px; }
  .support__icon--wifi { top: 6px; width: 41px; height: 32px; }
  .support__icon--items-list { width: 39.5px; height: 29px; }
  .support__icon--enter-btn { width: 40px; height: 37px; }
  .support__icon--browser-wifi { top: 6px; width: 41px; height: 32px; }
  .support__icon--app { width: 40px; height: 40px; }

  .link--support { line-height: 36px; }
}

@media (max-width: 480px) {
  .support__instructions--connection .support__step,
  .support__instructions--connection .support__step:nth-child(3n),
  .support__instructions--connection .support__step:nth-child(4n) { width: 40%; margin-right: 2.33%; }
  .support__instructions--connection .support__step::after,
  .support__instructions--connection .support__step:nth-child(3n)::after,
  .support__instructions--connection .support__step:nth-child(4n)::after {
    display: block;
    width: calc(100% - 48px);
    top: 20px;
    right: -24px;
  }
  .support__instructions--connection .support__step:nth-child(2n)::after,
  .support__instructions--connection .support__step:last-child::after { display: none; }
}

/* --- Баннер «Часто задаваемые вопросы» ----------------------------------- */

.support__card::before { min-height: 700px; }

.columns--projects { flex-direction: column; margin: 0; }
.columns--projects li:last-child h3 { margin-bottom: 0; }

.support__title {
  margin-bottom: 17px;
  font-weight: 500;
  font-size: 1.875rem;
  line-height: 2.375rem;
}

@media (max-width: 1199px) {
  .support__card .card__inner { padding: 38px 40px 33px; }
}
@media (max-width: 767px) {
  .support__card::before { min-height: 342px; }
  .support__card .card__inner { padding: 14px 16px 23px; }
  .support__title { margin-bottom: 10px; font-weight: 400; font-size: 1.375rem; line-height: 1.875rem; }
}

/* --- Блок приложения ----------------------------------------------------- */

.app {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  max-width: 667px;
  margin-top: 80px;
  margin-left: 40px;
  padding: 40px 92px 0 120px;
  background-color: #e7e8e8;
}
.app::after {
  content: "";
  position: absolute;
  top: 40px;
  left: 40px;
  z-index: 1;
  display: block;
  width: 56px;
  height: 56px;
  background: url("../img/icon-app.svg") 0 0 / 56px 56px no-repeat;
}

.app__container { width: 360px; }
.app__main-text { margin: 0; }
.app__title {
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
  color: var(--c-text);
}
.app__text {
  margin: 8px 0 112px;
  font-size: 16px;
  line-height: 24px;
}

.app__list {
  display: flex;
  align-items: flex-start;
  margin: 0;
  padding: 0;
}
.app__item { position: relative; margin-left: 8px; }
.app__item:first-child { margin-left: 0; }

.app__link {
  display: block;
  border-radius: 6px;
  transition: opacity .2s;
}
.app__link:hover { opacity: .85; }
.app__link:focus-visible { outline: 2px solid var(--c-navy); outline-offset: 3px; }
.app__badge { height: 40px; width: auto; }

.app__img { margin-left: auto; }

/* QR-подсказка над кнопкой магазина (только десктоп) */
.qr-link {
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  z-index: 2;
  width: 158px;
  padding: 19px 19px 16px;
  font-size: .875rem;
  line-height: 1.225rem;
  color: var(--c-text);
  background-color: var(--c-white);
  border-radius: 2px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .16);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  pointer-events: none;
}
.qr-link::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  display: block;
  width: 16px;
  height: 16px;
  background: var(--c-white);
  transform: translateX(-50%) rotate(135deg);
}
.qr-link__img { display: block; width: 120px; height: 120px; margin: 0 auto; }
.qr-link__text { margin: 8px 0 0; }

@media (min-width: 1200px) and (hover: hover) {
  .app__item:hover .qr-link,
  .app__link:focus-visible + .qr-link {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 1199px) {
  .app { margin-top: 55px; padding-right: 40px; max-width: 528px; }
  .app__container { width: 280px; }
  .app__text { margin-bottom: 60px; }
}

@media (max-width: 767px) {
  .app {
    display: block;
    max-width: 100%;
    margin: 16px 16px 0;
    padding: 92px 24px 0;
  }
  .app::after { top: 24px; left: 50%; transform: translateX(-50%); }
  .app__container { width: 100%; }
  .app__main-text { margin-bottom: 7px; text-align: center; }
  .app__title { font-size: 14px; line-height: 19px; }
  .app__text {
    max-width: 300px;
    margin: 7px auto 16px;
    font-size: 12px;
    line-height: 17px;
    text-align: center;
  }
  .app__list { justify-content: center; }
  .app__img img { width: 144px; height: 212px; margin: 28px auto 0; }
}

/* --- Контакты и форма ---------------------------------------------------- */

.support__contact { margin: 80px 0 41px; }

.support__contact-notice {
  max-width: 880px;
  margin: 0 0 31px;
  font-size: 2.5rem;
  line-height: 3.125rem;
}
.support__contact-caption {
  margin: 0 0 20px;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.5rem;
}
.support__contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 40px;
}

.support__offer {
  margin: 79px 0 0;
  font-size: .875rem;
  line-height: 1.25rem;
}

/* Поля формы — общие, в style.css (раздел «Формы») */

@media (max-width: 1199px) {
  .support__contact { margin-top: 79px; }
  .support__contact-notice { margin-bottom: 32px; }
  .support__contacts { margin-bottom: 36px; }
}

@media (max-width: 767px) {
  .support__contact { margin: 39px 0 17px; }
  .support__contact-notice { margin-bottom: 23px; font-size: 1.75rem; line-height: 2.4375rem; }
  .support__contact-caption { margin-bottom: 16px; font-size: .875rem; line-height: 1.375rem; }
  .support__contacts { margin-bottom: 25px; font-size: .875rem; line-height: 1.375rem; }
  .form__button { width: 100%; padding: 15px 9px 17px; font-size: 1.125rem; line-height: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tabs__content { animation: none; }
}

/* Иконки шагов «через приложение» в английской версии (в русской эти шаги убраны) */
.support__icon--setting-on { top: 19px; left: 0; }
@media (max-width: 767px) {
  .support__icon--setting-on { width: 40px; height: 21px; }
  .support__icon--push-message { width: 40px; height: 40px; }
}
