/**
 * Swap Module Styles
 */

/* ============================================
 * CSS Variables & Root Styles
 * ============================================ */
:host {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Color Palette */
  --primary-color: #1a1a1a;
  --card-background: #f8f9fa;
  --border-color: #e5e7eb;
  --text-color: #1a1a1a;
  --secondary-text-color: #6b7280;
  --highlight-color: rgb(243, 248, 252);
  --active-color: #e5e7eb;
  --button-color: #1a1a1a;
  --button-hover: #2d2d2d;
  --warn-color: #ff8f4a;
  --error-color: #ff494a;
  --success-color: #00c089;
  --overlay-background: rgba(0, 0, 0, 0.3);

  /* Layout */
  --radius: 0px;
}

/* ============================================
 * Container & Layout
 * ============================================ */
.swap-box {
  padding: 24px;
  position: relative;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.swap-section {
  background-color: white;
  margin-bottom: 16px;
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ============================================
 * Header & Title
 * ============================================ */
.swap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.swap-title {
  font-size: 24px;
  color: var(--text-color);
  margin: 0;
}

/* ============================================
 * Header Wallet Button
 * ============================================ */
.wallet-button-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  color: var(--secondary-text-color);
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.wallet-button-header:hover {
  color: var(--text-color);
}

.wallet-button-header svg {
  opacity: 0.6;
}

/* Connected wallet button */
.wallet-button-connected {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.wallet-button-connected:hover {
  opacity: 0.7;
}

.wallet-icon {
  width: 28px;
  height: 28px;
}

.wallet-chevron {
  color: var(--secondary-text-color);
}

/* Wallet dropdown */
.wallet-dropdown-wrapper {
  position: relative;
}

.wallet-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 8px;
  min-width: 180px;
  z-index: 100;
}

.wallet-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  text-align: left;
}

.wallet-dropdown-item:hover {
  background: var(--card-background);
}

.wallet-dropdown-item svg {
  color: var(--secondary-text-color);
}

.wallet-dropdown-item-danger {
  color: var(--error-color);
}

.wallet-dropdown-item-danger svg {
  color: var(--error-color);
}

/* Legacy wallet button (for swap button) */
.wallet-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.wallet-button:hover {
  background-color: var(--primary-color);
  filter: brightness(0.9);
}

.wallet-button:active {
  transform: scale(0.98);
}

.wallet-address-text {
  font-weight: 500;
}

/* ============================================
 * Destination Hero Section
 * ============================================ */
.destination-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 16px;
}

.destination-amount-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.destination-token-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.destination-amount {
  font-size: 48px;
  font-weight: 600;
}

.destination-amount-integer {
  color: var(--text-color);
}

.destination-amount-decimal {
  color: var(--secondary-text-color);
}

.destination-amount-input {
  font-size: 48px;
  font-weight: 600;
  color: var(--text-color);
  background: transparent;
  border: none;
  outline: none;
  text-align: left;
  width: 100%;
  max-width: 280px;
  padding: 0;
  font-family: inherit;
}

.destination-amount-input::placeholder {
  color: var(--secondary-text-color);
  opacity: 0.5;
}

/* ============================================
 * Network Selector
 * ============================================ */
.network-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.network-label {
  font-size: 14px;
  color: var(--secondary-text-color);
}

.network-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.network-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.network-dropdown-trigger:hover:not(.disabled) {
  background: var(--card-background);
}

.network-dropdown-trigger.disabled {
  cursor: default;
  opacity: 0.8;
}

.network-chain-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.network-chain-name {
  font-weight: 500;
}

.network-chevron {
  color: var(--secondary-text-color);
  margin-left: 2px;
}

.network-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 8px;
  min-width: 140px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.network-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  text-align: left;
}

.network-dropdown-item:hover {
  background: var(--card-background);
}

.network-dropdown-item.selected {
  background: var(--highlight-color);
}

.network-item-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.network-item-name {
  flex: 1;
}

/* ============================================
 * Source Card
 * ============================================ */
.source-card {
  background-color: #f3f8fc;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.source-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.source-token-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.source-token-button:hover:not(.disabled) {
  background: var(--card-background);
}

.source-token-button.disabled {
  cursor: default;
}

.source-token-icon-container {
  position: relative;
  width: 32px;
  height: 32px;
}

.source-token-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.source-chain-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  bottom: -2px;
  right: -2px;
  border: 2px solid white;
}

.source-token-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.source-token-symbol {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
}

.source-token-chain {
  font-size: 12px;
  color: var(--secondary-text-color);
}

.source-chevron {
  color: var(--secondary-text-color);
  margin-left: 4px;
}

.source-balance-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.source-balance {
  font-size: 14px;
  color: var(--secondary-text-color);
}

.source-percent-buttons {
  display: flex;
  gap: 8px;
}

.source-percent-button {
  padding: 0;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary-text-color);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
}

.source-percent-button:hover {
  color: var(--text-color);
}

.source-amount-input {
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 32px;
  font-weight: 600;
  outline: none;
  width: 100%;
  padding: 8px 0;
  font-family: inherit;
}

.source-amount-input::placeholder {
  color: var(--secondary-text-color);
  opacity: 0.5;
}

.exchange-rate {
  font-size: 13px;
  color: var(--secondary-text-color);
  margin-top: 4px;
}

/* ============================================
 * Token Cards
 * ============================================ */
.token-cards-container {
  display: flex;
  align-items: center;
  position: relative;
}

.token-card {
  flex: 1;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.token-card:hover {
  background: var(--card-background);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.token-card:first-child {
  border-right: 1px solid var(--border-color);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}

.token-card.disabled {
  cursor: default;
  opacity: 0.8;
}

.token-card.disabled:hover {
  background: transparent;
}

.token-card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 12px;
}

.token-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.token-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.token-card-symbol {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
}

.token-card-chain,
.token-card-balance {
  font-size: 13px;
  color: var(--secondary-text-color);
}

.token-arrow {
  color: var(--secondary-text-color);
  font-size: 18px;
  padding: 4px;
  padding-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  background-color: white;
}

/* ============================================
 * Token Icons
 * ============================================ */
.token-icon-container {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-block;
}

.token-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.chain-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  bottom: -4px;
  right: -4px;
  border: 2px solid white;
}

/* ============================================
 * Token Selection Tabs
 * ============================================ */
.token-select-row {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-color);
}

.token-select-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.token-select-button.active {
  border-bottom-color: var(--text-color);
}

.token-select-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color);
}

/* ============================================
 * Token Dropdown
 * ============================================ */
.token-selector-container {
  margin-bottom: 0;
}

.token-dropdown {
  background-color: white;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Dropdown Header */
.token-dropdown-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  padding-bottom: 12px;
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  padding: 0;
  transition: opacity 0.2s;
}

.back-button:hover {
  opacity: 0.7;
}

.token-dropdown-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
}

/* Search with Chain Filter */
.search-with-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 16px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  background: var(--card-background);
  border-radius: 8px;
}

.search-icon-svg {
  position: absolute;
  left: 12px;
  color: var(--secondary-text-color);
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  background: transparent;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--secondary-text-color);
}

.chain-filter-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.chain-filter-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.chain-filter-trigger:hover {
  background: var(--card-background);
}

.chain-filter-trigger .chain-filter-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.chain-filter-name {
  white-space: nowrap;
}

.chain-filter-chevron {
  color: var(--secondary-text-color);
  margin-left: 2px;
}

.chain-filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 8px;
  min-width: 140px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.chain-filter-menu .chain-filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  text-align: left;
}

.chain-filter-menu .chain-filter-item:hover {
  background: var(--card-background);
}

.chain-filter-menu .chain-filter-item.selected {
  background: var(--highlight-color);
}

.chain-item-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.chain-item-name {
  flex: 1;
  white-space: nowrap;
}

/* Legacy chain select (keep for compatibility) */
.chain-select {
  appearance: none;
  padding: 10px 32px 10px 12px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  font-family: inherit;
  outline: none;
}

.chain-select:hover {
  background: var(--card-background);
}

.select-chevron {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--secondary-text-color);
}

/* Legacy Search Bar (keep for compatibility) */
.search-container {
  padding: 12px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--secondary-text-color);
  font-size: 16px;
}

.close-button {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--secondary-text-color);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Chain Filter (legacy) */
.chain-filter {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chain-filter::-webkit-scrollbar {
  display: none;
}

.chain-filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.chain-filter-item:hover,
.chain-filter-item.active {
  background: var(--card-background);
}

.chain-filter-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

/* Token List */
.token-list {
  max-height: 350px;
  overflow-y: auto;
  padding: 0 8px 8px;
}

.token-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.token-list-item:hover,
.token-list-item.selected {
  background-color: var(--card-background);
}

.token-list-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.token-list-item-symbol {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
}

.token-list-item-chain {
  font-size: 13px;
  color: var(--secondary-text-color);
}

.token-list-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.token-list-item-balance {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
}

/* ============================================
 * Amount Input Section
 * ============================================ */
.amount-section {
  padding: 16px;
}

.amount-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.amount-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
}

.amount-options {
  display: flex;
  gap: 12px;
}

.amount-option {
  padding: 4px 8px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--secondary-text-color);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.amount-option:hover {
  color: var(--text-color);
}

.amount-input {
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 36px;
  font-weight: 600;
  outline: none;
  width: 100%;
  padding: 0;
  font-family: inherit;
  margin-bottom: 24px;
}

.amount-input::placeholder {
  color: var(--secondary-text-color);
  opacity: 0.3;
}

.amount-input:read-only {
  cursor: default;
}

/* ============================================
 * Quote Display
 * ============================================ */
.quote-result-inline {
  padding: 16px;
  margin: -16px;
  margin-top: 0;
  background-color: var(--highlight-color);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.quote-label {
  font-size: 13px;
  color: var(--secondary-text-color);
  margin-bottom: 6px;
  font-weight: 500;
}

.quote-amount-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.quote-amount-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.quote-amount-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-color);
}

.quote-details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quote-rate {
  font-size: 13px;
  color: var(--secondary-text-color);
}

.quote-time {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background-color: rgba(107, 114, 128, 0.1);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--secondary-text-color);
}

/* ============================================
 * Recipient Section
 * ============================================ */
.recipient-section {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
}

.recipient-input {
  font-size: 14px !important;
  margin-bottom: 0;
  font-weight: 500;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
}

/* ============================================
 * Alerts
 * ============================================ */
.alert-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-box.error {
  background-color: rgba(255, 73, 74, 0.1);
  border: 1px solid rgba(255, 73, 74, 0.3);
  color: var(--error-color);
}

.alert-box.warn {
  background-color: rgba(255, 171, 74, 0.1);
  border: 1px solid rgba(255, 171, 74, 0.3);
  color: var(--warn-color);
}

.alert-message {
  flex: 1;
  line-height: 1.4;
}

/* ============================================
 * Swap Button
 * ============================================ */
.swap-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 28px;
  padding: 16px;
  width: 100%;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 56px;
}

.swap-button:hover:not(:disabled) {
  background-color: var(--button-hover);
}

.swap-button:disabled {
  background-color: var(--primary-color);
  filter: brightness(0.7);
  color: rgba(255, 255, 255, 0.7);
  cursor: not-allowed;
}

.swap-button.loading {
  position: relative;
  cursor: not-allowed;
}

.swap-button.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
 * Footer & Branding
 * ============================================ */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.powered-by {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--secondary-text-color);
}

.m0-icon {
  width: 16px;
  height: 12px;
  padding: 6px 4px;
  background: black;
}

.best-route {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--secondary-text-color);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: opacity 0.2s;
}

.best-route:hover {
  opacity: 0.7;
}

.best-route-label {
  font-weight: 400;
}

.best-route-time {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  font-weight: 500;
  color: var(--text-color);
}

.best-route-time svg {
  color: var(--secondary-text-color);
}

/* ============================================
 * Route Details View
 * ============================================ */
.route-details {
  padding: 0;
}

.route-details-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 0 20px;
}

.route-details-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
}

.route-summary {
  background: var(--card-background);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.route-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.route-summary-row:first-child {
  padding-top: 0;
}

.route-summary-row:last-child {
  padding-bottom: 0;
}

.route-summary-label {
  font-size: 14px;
  color: var(--secondary-text-color);
}

.route-summary-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
}

.route-summary-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.route-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.route-step {
  display: flex;
  gap: 12px;
  padding-left: 4px;
}

.route-step-indicator {
  color: var(--secondary-text-color);
  font-size: 16px;
  font-weight: 500;
  min-width: 16px;
}

.route-step-content {
  flex: 1;
}

.route-step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
}

.route-step-description {
  font-size: 12px;
  color: var(--secondary-text-color);
  line-height: 1.4;
}

/* ============================================
 * Loading State
 * ============================================ */
.loading-container {
  height: 120px;
  width: 100%;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: loading 2s ease-in-out infinite;
  margin-bottom: 16px;
  border-radius: var(--radius);
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ============================================
 * Confirmation Screen
 * ============================================ */
.confirmation-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.confirmation-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.confirmation-back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  transition: opacity 0.2s;
}

.confirmation-back-button:hover {
  opacity: 0.7;
}

.confirmation-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
}

.confirmation-token-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
}

.confirmation-token-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.confirmation-token-icon-container {
  position: relative;
  width: 40px;
  height: 40px;
}

.confirmation-token-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.confirmation-chain-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid white;
  background: white;
  object-fit: cover;
}

.confirmation-token-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.confirmation-token-symbol {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
}

.confirmation-token-chain {
  font-size: 13px;
  color: var(--secondary-text-color);
}

.confirmation-token-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.confirmation-amount-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
}

.confirmation-slippage {
  font-size: 12px;
  color: var(--secondary-text-color);
}

.confirmation-arrow {
  display: flex;
  justify-content: center;
  padding: 8px 0;
  color: var(--secondary-text-color);
}

.confirmation-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
}

.confirmation-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.confirmation-detail-label {
  font-size: 14px;
  color: var(--secondary-text-color);
}

.confirmation-detail-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
}

.confirmation-detail-underline {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.confirmation-detail-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.confirmation-detail-address {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.confirmation-detail-sublabel {
  font-size: 12px;
  color: var(--secondary-text-color);
}

.confirmation-button {
  width: 100%;
  padding: 16px;
  background-color: var(--button-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: inherit;
  margin-top: 8px;
}

.confirmation-button:hover:not(:disabled) {
  background-color: var(--button-hover);
}

.confirmation-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.confirmation-button.loading {
  position: relative;
  opacity: 0.8;
  cursor: wait;
}

.confirmation-details-compact {
  padding: 16px 0;
  margin-top: 0;
}

/* ============================================
 * Confirmation Result Banners
 * ============================================ */
.confirmation-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  border-radius: var(--radius);
  margin-top: 16px;
}

.confirmation-result-success {
  background-color: rgba(0, 192, 137, 0.1);
}

.confirmation-result-failed {
  background-color: rgba(255, 73, 74, 0.1);
}

.confirmation-result-icon {
  width: 32px;
  height: 32px;
}

.confirmation-result-success .confirmation-result-icon {
  color: var(--success-color);
}

.confirmation-result-failed .confirmation-result-icon {
  color: var(--error-color);
}

.confirmation-result-text {
  font-size: 16px;
  font-weight: 600;
}

.confirmation-result-success .confirmation-result-text {
  color: var(--success-color);
}

.confirmation-result-failed .confirmation-result-text {
  color: var(--error-color);
}

.confirmation-result-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}

.confirmation-result-success .confirmation-result-link {
  color: var(--success-color);
}

.confirmation-result-failed .confirmation-result-link {
  color: var(--error-color);
}

.confirmation-result-link:hover {
  opacity: 0.8;
}
