/* Блок «Обмен криптовалюты»: направления, калькулятор, условия, контакты */
.xr__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.xr__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-right: auto;
}

.xr__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--c-surface);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.xr__date::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-up);
  box-shadow: 0 0 0 4px rgba(20, 156, 122, 0.15);
}

/* --- Карточки направлений --- */
.xr__directions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.dir {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 29px;
  border-radius: var(--radius-card);
  background: var(--c-surface);
}

.dir--accent {
  background: var(--grad-promo);
  color: var(--c-white);
}

.dir__route {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
}

.dir__arrow {
  width: 18px;
  height: 18px;
  opacity: 0.5;
}

.coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 19px;
  font-weight: 600;
  color: var(--c-white);
}

.coin--usdt {
  background: #26a17b;
}

.coin--usd {
  background: #2f8a4a;
}

.coin--rub {
  background: var(--c-primary);
}

.dir--accent .coin {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.dir__value {
  padding-top: 36px;
  font-size: clamp(44px, 4.4vw, 64px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.dir__value small {
  font-size: 0.5em;
  font-weight: 500;
}

.dir__caption {
  margin-top: 12px;
  font-size: 16px;
  color: var(--c-muted);
}

.dir--accent .dir__caption {
  color: var(--c-on-accent-muted);
}

.dir__example {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--c-line);
  font-size: 15px;
  line-height: 1.4;
}

.dir__caption {
  margin-bottom: 20px;
}

.dir__example b {
  white-space: nowrap;
}

.dir--accent .dir__example {
  border-top-color: rgba(255, 255, 255, 0.2);
}

.dir__tag {
  position: absolute;
  top: 29px;
  right: 29px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 500;
}

.dir__tag--muted {
  background: var(--c-white);
  color: var(--c-muted);
}

/* --- Калькулятор --- */
.calc {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  padding: 24px 29px;
  border-radius: var(--radius-card);
  background: var(--c-white);
  box-shadow: var(--shadow-card);
}

.calc__tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: var(--radius-pill);
  background: var(--c-surface);
}

.calc__tab {
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}

.calc__tab[aria-selected="true"] {
  background: var(--c-primary);
  color: var(--c-white);
}

.calc__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.calc__label {
  font-size: 14px;
  color: var(--c-muted);
}

.calc__input-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-bottom: 1px solid var(--c-line);
}

.calc__input {
  width: 100%;
  min-width: 0;
  padding: 4px 0 6px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 28px;
  font-weight: 500;
  color: var(--c-ink);
  outline: none;
}

.calc__input-wrap:focus-within {
  border-bottom-color: var(--c-primary);
}

.calc__unit {
  font-size: 18px;
  color: var(--c-muted);
}

.calc__eq {
  width: 22px;
  height: 22px;
  color: var(--c-muted-light);
}

.calc__result {
  padding: 4px 0 6px;
  font-size: 28px;
  font-weight: 600;
  color: var(--c-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid transparent;
}

/* --- Условия --- */
.xr__perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.perk {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.perk__icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(20, 156, 122, 0.12);
  color: var(--c-up);
}

.perk__icon svg {
  width: 20px;
  height: 20px;
}

.perk__title {
  font-size: 18px;
  font-weight: 500;
}

.perk__text {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--c-muted);
}

/* --- Нижняя плашка: доп. услуги + контакты --- */
.xr__info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 40px;
  align-items: center;
  margin-top: 40px;
  padding: 29px;
  border-radius: var(--radius-card);
  background: var(--c-ink);
  color: var(--c-white);
}

.xr__also-title {
  font-size: 14px;
  color: var(--c-on-dark-muted);
}

.xr__also {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
}

.xr__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 20px;
  font-size: 15px;
  color: var(--c-on-accent-muted);
}

.xr__facts strong {
  color: var(--c-white);
  font-weight: 500;
}

.xr__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xr__cta .btn {
  min-width: 260px;
}

/* ===== Адаптив ===== */
@media (max-width: 1099px) {
  .calc {
    grid-template-columns: 1fr auto 1fr;
  }

  .calc__tabs {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 959px) {
  .xr__directions,
  .xr__perks {
    grid-template-columns: 1fr;
  }

  .dir {
    min-height: 0;
  }

  .dir__value {
    padding-top: 28px;
  }

  .xr__info {
    grid-template-columns: 1fr;
  }

  .xr__cta .btn {
    min-width: 0;
  }
}

@media (max-width: 639px) {
  .dir,
  .calc,
  .xr__info {
    padding: 24px;
  }

  .dir__tag {
    top: 24px;
    right: 24px;
  }

  .calc {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .calc__tabs {
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
  }

  .calc__eq {
    transform: rotate(90deg);
  }
}
