/**
 * MagicX Token Generator - Components Styling
 * Live-Only Web3 & Transaction Fee Engine
 */

/* View Sections */
.view-section {
  display: none;
  animation: fadeIn 0.3s ease-out;
}
.view-section.active {
  display: block;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(0, 242, 254, 0.3);
}

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

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Generator Main Interface */
.generator-container {
  max-width: 660px;
  width: 100%;
  margin: 20px auto;
}

.asset-box {
  background: var(--bg-glass-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 12px;
  transition: var(--transition-fast);
}

.asset-box:focus-within {
  border-color: var(--border-glass-focus);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.asset-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.asset-box-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.asset-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  width: 0;
  min-width: 0;
  flex: 1 1 0%;
  outline: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.asset-input::placeholder {
  color: var(--text-muted);
}

.token-pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.token-pill-btn:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--neon-cyan);
}

.token-pill-btn img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.asset-box-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.percentage-pills {
  display: flex;
  gap: 6px;
}

.pct-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.pct-btn:hover {
  background: rgba(0, 242, 254, 0.15);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

/* Generation Divider / Action Indicator */
.generator-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -6px 0;
  z-index: 2;
}

.gen-symbol-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #111625;
  border: 2px solid var(--border-glass);
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  font-size: 1.1rem;
}

/* Fee & Route Breakdown Card */
.quote-details-card {
  background: rgba(10, 14, 24, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 16px 0;
  font-size: 0.85rem;
}

.quote-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  color: var(--text-secondary);
}

.quote-row > span:first-child {
  flex-shrink: 0;
  white-space: nowrap;
}

.quote-row.highlight {
  border-top: 1px solid var(--border-subtle);
  margin-top: 8px;
  padding-top: 10px;
  color: #ffffff;
  font-weight: 600;
  align-items: center;
}

.quote-val {
  font-family: var(--font-mono);
  color: #ffffff;
  text-align: right;
  word-break: break-all;
  flex: 1;
  font-size: 0.84rem;
}

.expiry-counter {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 183, 3, 0.12);
  color: var(--warning-amber);
  border: 1px solid rgba(255, 183, 3, 0.25);
}

/* Action Primary Button */
.btn-primary-action {
  width: 100%;
  padding: 16px;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: var(--font-main);
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--laser-purple) 100%);
  color: #080b11;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--glow-cyan);
  transition: var(--transition-smooth);
}

.btn-primary-action:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.5);
}

.btn-primary-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.6);
  transform: none;
}

/* Deposit Center */
.deposit-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
  align-items: stretch;
}

.deposit-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 14, 24, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  text-align: center;
}

.qr-wrapper {
  padding: 12px;
  background: #080b11;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deposit-details-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.deposit-net-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  width: 100%;
}

.deposit-net-pill {
  flex: 1 1 0;
  min-width: max-content;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  box-sizing: border-box;
  transition: var(--transition-fast);
}

.deposit-net-pill:hover {
  background: rgba(0, 242, 254, 0.12);
  color: var(--neon-cyan);
  border-color: rgba(0, 242, 254, 0.4);
}

.deposit-net-pill.active {
  background: rgba(0, 242, 254, 0.16);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.25);
}

.deposit-info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.deposit-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.deposit-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
}

.deposit-address-text {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: -0.01em;
  color: #ffffff;
  word-break: break-all;
  line-height: 1.4;
  flex: 1;
}

.copy-btn-action {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 6px 14px !important;
  font-size: 0.8rem !important;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(0, 242, 254, 0.08) !important;
  border: 1px solid rgba(0, 242, 254, 0.3) !important;
  color: var(--neon-cyan) !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn-action:hover {
  background: rgba(0, 242, 254, 0.2) !important;
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
  transform: translateY(-1px);
}

/* Transfer Module */
.transfer-container {
  max-width: 540px;
  margin: 20px auto;
}

.input-field-group {
  margin-bottom: 16px;
}

.input-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.text-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.text-input:focus {
  border-color: var(--border-glass-focus);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 11, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #111625;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #ffffff;
}

/* Activity Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.magicx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.magicx-table th {
  text-align: left;
  padding: 12px 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
}

.magicx-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge-success {
  background: rgba(0, 255, 157, 0.12);
  color: var(--electric-emerald);
  border: 1px solid rgba(0, 255, 157, 0.3);
}

.status-badge-pending {
  background: rgba(255, 183, 3, 0.12);
  color: var(--warning-amber);
  border: 1px solid rgba(255, 183, 3, 0.3);
}

.status-badge-error {
  background: rgba(255, 51, 102, 0.12);
  color: var(--danger-crimson);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.type-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.type-pill.generation {
  background: rgba(0, 242, 254, 0.15);
  color: var(--neon-cyan);
}
.type-pill.transfer {
  background: rgba(157, 78, 221, 0.15);
  color: var(--laser-purple);
}
.type-pill.approval {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.magicx-toast {
  background: #111625;
  border: 1px solid var(--border-glass);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  animation: slideInToast 0.3s ease-out;
}

.magicx-toast.success {
  border-left: 4px solid var(--electric-emerald);
}
.magicx-toast.warning {
  border-left: 4px solid var(--warning-amber);
}
.magicx-toast.error {
  border-left: 4px solid var(--danger-crimson);
}

/* ==========================================================================
   Token Selector Modal & On-Chain Resolution System
   ========================================================================== */
.token-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.token-list-item:hover {
  background: rgba(0, 242, 254, 0.06);
  border-color: rgba(0, 242, 254, 0.25);
  transform: translateY(-1px);
}

.token-list-item.verified-onchain-card {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.05) 0%, rgba(0, 255, 157, 0.03) 100%);
  border: 1px solid rgba(0, 242, 254, 0.35);
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.1);
  margin-bottom: 8px;
}

.token-list-item.verified-onchain-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 4px 25px rgba(0, 242, 254, 0.2);
}

.token-avatar-container {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.token-avatar-container img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #111625;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.token-net-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  color: #080b11;
  text-transform: uppercase;
  line-height: 1.2;
}

.verified-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--electric-emerald);
  background: rgba(0, 255, 157, 0.1);
  border: 1px solid rgba(0, 255, 157, 0.25);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.cross-network-alert {
  background: rgba(255, 183, 3, 0.1);
  border: 1px solid rgba(255, 183, 3, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: #ffb703;
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-search-onchain-status {
  padding: 24px 16px;
  text-align: center;
  background: rgba(10, 14, 24, 0.6);
  border: 1px dashed rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.radar-spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  border: 3px solid rgba(0, 242, 254, 0.15);
  border-top-color: var(--neon-cyan);
  border-right-color: var(--laser-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.mini-copy-btn, .mini-explorer-link {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.mini-copy-btn:hover, .mini-explorer-link:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--neon-cyan);
  color: #ffffff;
}

.select-token-action-btn {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, #00b4d8 100%);
  color: #080b11;
  font-weight: 700;
  font-size: 0.75rem;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 242, 254, 0.25);
}

.select-token-action-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.4);
}

.token-not-found-card {
  padding: 24px 16px;
  text-align: center;
  background: rgba(255, 51, 102, 0.04);
  border: 1px dashed rgba(255, 51, 102, 0.3);
  border-radius: var(--radius-md);
  margin: 12px 0;
}

/* MagicX Modern Toggle Switch (Admin Withdrawal Controller) */
.switch-control {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
  cursor: pointer;
  user-select: none;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 30px;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.switch-knob {
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #cbd5e1;
  border-radius: 50%;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.switch-control input:checked + .switch-slider {
  background: linear-gradient(135deg, #00f2fe 0%, #00c6ff 100%);
  border-color: #00f2fe;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.45);
}

.switch-control input:checked + .switch-slider .switch-knob {
  transform: translateX(26px);
  background-color: #080b11;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}


