.convert-page {
  min-height: 100vh;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
  background: transparent;
}

.convert-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  min-height: 58px;
}

.convert-header h1 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  line-height: 1.1;
  text-align: center;
}

.convert-form {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.convert-box,
.quote-summary {
  border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line));
  background:
    radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 32%),
    linear-gradient(180deg, color-mix(in srgb, var(--card) 96%, transparent), var(--card-soft));
  box-shadow: var(--shadow-soft);
}

.convert-box {
  min-height: 132px;
  padding: 17px 16px;
  border-radius: 18px;
}

.box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.box-head span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.box-head small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.box-head small b {
  color: var(--text);
  font-weight: 800;
}

.amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  align-items: center;
  gap: 10px;
}

.amount-row-wide {
  grid-template-columns: minmax(0, 1fr) auto 116px;
}

.amount-row input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  font-size: clamp(34px, 9.6vw, 42px);
  font-weight: 800;
  line-height: 1;
}

.amount-row input::placeholder {
  color: color-mix(in srgb, var(--text) 34%, transparent);
}

.amount-row .select-trigger {
  min-height: 50px;
  border-color: var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 82%, #000 18%);
  color: var(--text);
  font-size: 15px;
}

.convert-max-chip {
  min-width: 50px;
  height: 34px;
  padding: 0 12px;
  border-color: color-mix(in srgb, var(--brand) 70%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  color: var(--brand);
  font-size: 13px;
}

.convert-swap-slot {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 46px;
  margin: -2px 0;
}

.convert-swap-float {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid color-mix(in srgb, var(--brand) 78%, var(--black));
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, color-mix(in srgb, var(--text) 18%, transparent), transparent 28%),
    linear-gradient(180deg, var(--brand-2), var(--brand));
  color: var(--black);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--bg) 86%, transparent),
    0 0 0 5px color-mix(in srgb, var(--brand) 32%, transparent),
    0 12px 22px rgba(0, 0, 0, 0.36);
  pointer-events: none;
}

.convert-swap-float svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.8;
}

.quote-summary {
  display: grid;
  gap: 0;
  margin-top: 6px;
  padding: 22px 18px;
  border-color: var(--line);
  border-radius: 18px;
}

.quote-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
}

.quote-summary div:last-child {
  border-bottom: 0;
}

.quote-summary span {
  color: var(--muted);
  font-size: 16px;
}

.quote-summary strong {
  color: var(--text);
  font-size: 16px;
  text-align: right;
}

.quote-summary div:last-child strong {
  color: var(--green-2);
}

.convert-page .wide-button {
  width: 100%;
  min-height: 58px;
  margin-top: 12px;
  border-radius: 12px;
  font-size: 18px;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--text) 26%, transparent),
    0 5px 10px color-mix(in srgb, var(--brand) 12%, transparent);
}

.convert-status {
  margin: 0;
  color: var(--green-2);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.convert-status[data-type="error"] {
  color: var(--red);
}

.convert-status[data-type="success"] {
  color: var(--green-2);
}

@media (max-width: 380px) {
  .convert-box {
    min-height: 126px;
    padding: 16px 14px;
  }

  .amount-row,
  .amount-row-wide {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  .amount-row-wide {
    grid-template-areas:
      "amount picker"
      "max picker";
  }

  .amount-row-wide input {
    grid-area: amount;
  }

  .amount-row-wide .convert-max-chip {
    grid-area: max;
    justify-self: start;
  }

  .amount-row-wide .select-trigger {
    grid-area: picker;
  }

  .amount-row input {
    font-size: 32px;
  }

  .convert-swap-slot {
    height: 44px;
    margin: -2px 0;
  }

  .convert-swap-float {
    width: 44px;
    height: 44px;
  }
}
