/* Exchange panel — integrated with changer2 white theme (no nested card) */

.exchange__panel.panel {
  min-height: auto;
  padding: 28px 28px 32px;
}

.exchange__panel #exchange-form {
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  font-size: inherit;
  color: inherit;
}

.exchange__panel .panel__title,
.exchange__panel-title {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 22px;
  text-align: center;
}

.exchange__subtitle {
  max-width: 640px;
  font-size: 17px;
  line-height: 1.5;
  opacity: 0.75;
}

.exchange__panel-top {
  flex-wrap: wrap;
  gap: 16px;
}

.exchange__panel-top .panel__wrapper:last-child {
  flex-wrap: wrap;
  gap: 8px;
}

.panel__btn {
  border: none;
  font-family: inherit;
}

.panel__link-rules {
  color: #2b59ff;
  text-decoration: underline;
}

.panel__link-rules:hover {
  opacity: 0.85;
}

.exchange__panel-bottom-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 8px;
}

.exchange__panel-start,
.exchange__panel-end {
  min-width: 0;
}

#exchange-form .input,
#exchange-form .input__wrapper .input,
#input__get,
#payout_address {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.2;
  color: #12141d;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#exchange-form .input:focus,
#input__get:focus,
#payout_address:focus {
  outline: none;
  border-color: #2b59ff;
  box-shadow: 0 0 0 3px rgba(43, 89, 255, 0.12);
}

#exchange-form .input__wrapper .input {
  padding-right: 72px;
}

#input__get,
#payout_address {
  margin-top: 10px;
  padding-right: 16px;
}

#to[readonly] {
  background: #f7f9fc;
  color: #12141d;
  cursor: default;
}

.input__wrapper {
  position: relative;
}

.input__text {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 600;
  color: #667085;
  font-size: 13px;
  pointer-events: none;
  margin: 0;
}

.exchange__panel .select__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  overflow: visible;
}

.exchange__panel .select__current {
  flex: 1 1 auto;
  min-width: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  display: flex;
  align-items: center;
  gap: 10px;
}

.exchange__panel .select__text {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 13px;
}

.select__coin-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.select__coin-code {
  font-size: 17px;
  font-weight: 700;
  color: #12141d;
  line-height: 1.2;
}

.select__coin-net {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf2ff;
  color: #2b59ff;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.select__coin-name {
  font-size: 12px;
  color: #667085;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exchange__panel .select__img,
.exchange__panel .coin-icon,
.exchange__panel .coin-icon-wrap {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.exchange__panel .select__body {
  max-height: min(520px, 70vh) !important;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 20px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.exchange__panel .select__body .select__item {
  font-size: 16px;
  line-height: 1.25;
  padding: 10px 14px;
}

.exchange__panel .select__body .select__item:last-child {
  margin-bottom: 4px;
}

.exchange__field-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #667085;
}

.exchange__panel-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eceff5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.exchange__panel-footer .exchange__panel-btn {
  width: 100%;
  min-height: 52px;
  font-size: 17px;
}

.exchange__panel-footer .exchange__panel-text {
  text-align: center;
  width: 100%;
}

.exchange__panel-wrapper-show,
.exchange__panel-wrapper-hide {
  display: none !important;
}

.exchange__panel .select__item {
  padding: 12px 16px;
  gap: 10px;
  overflow: visible;
}

.exchange__panel .select__item .select__img {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 4px;
}

.exchange__panel .select__current,
.exchange__panel .select__item {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.exchange__panel-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.exchange__panel-btn {
  min-width: 220px;
  white-space: nowrap;
}

.exchange__panel-text {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.exchange__notice,
.exchange__rate {
  max-width: 100%;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.35;
}

.exchange__notice_info {
  background: #edf4ff;
  color: #164ea6;
  border: 1px solid #cddfff;
}

.exchange__notice_warning {
  background: #fff8e6;
  color: #8a5b00;
  border: 1px solid #ffe1a1;
}

.exchange__notice_error {
  background: #fff1f1;
  color: #9f1d1d;
  border: 1px solid #ffcaca;
}

.exchange__rate {
  background: #f2fbf6;
  color: #167044;
  border: 1px solid #bfe8d1;
  font-weight: 600;
}

.exchange__empty {
  display: grid;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid #d8e3ff;
  border-radius: 14px;
  background: #f7faff;
  color: #1f2a44;
  text-align: center;
}

.exchange__empty strong {
  font-size: 20px;
  color: #123073;
}

.exchange__panel-btn:disabled,
#exchange-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.advantages__block-img--emoji {
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(43, 89, 255, 0.08);
  border-radius: 14px;
}

.coins {
  pointer-events: none;
}

@media (max-width: 1050px) {
  .exchange__panel-bottom-wrapper {
    grid-template-columns: 1fr;
  }

  .exchange__title {
    width: auto;
    font-size: 42px;
  }
}

@media (max-width: 640px) {
  .exchange {
    padding-top: 24px;
  }

  .exchange__title {
    font-size: 32px;
  }

  .exchange__panel.panel {
    padding: 18px 16px 22px;
    border-radius: 18px;
  }

  .exchange__panel .select__current {
    font-size: 16px;
  }

  .exchange__panel-top .panel__wrapper:first-child {
    width: 100%;
  }

  .exchange__panel-step-text {
    font-size: 14px;
  }
}
