/* Atlas Swap Component Styles - Dark Theme */

/* Main swap container */
.swap-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin: 0 auto;
}

/* Form sections */
.form-section {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  background-color: var(--atlas-background-light);
}

/* Form groups */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--atlas-text);
  font-size: 14px;
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 12px;
  background-color: var(--atlas-background);
  border: 1px solid var(--atlas-surface-light);
  border-radius: 8px;
  color: var(--atlas-text);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group select:focus,
.form-group input:focus {
  border-color: var(--atlas-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  outline: none;
}

/* Swap direction icon */
.swap-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s;
  color: var(--atlas-primary);
  background-color: var(--atlas-background-dark);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
  z-index: 10;
}

.swap-icon:hover {
  transform: rotate(180deg);
  box-shadow: var(--atlas-shadow-neon);
}

/* Quote and status panels */
.quote-panel,
.status-panel {
  margin-top: 24px;
}

.quote-result {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  background-color: var(--atlas-background-light);
}

.quote-result h3 {
  color: var(--atlas-primary);
  font-size: 18px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quote-details {
  margin-bottom: 20px;
}

.quote-details p {
  margin: 8px 0;
  color: var(--atlas-text-muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

.quote-details p strong {
  font-weight: 600;
  color: var(--atlas-text);
}

/* Exchange info */
.exchange-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin: 16px 0;
  padding: 16px;
  background-color: var(--atlas-background-dark);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.exchange-info-item {
  text-align: center;
}

.exchange-info-item .label {
  font-size: 12px;
  color: var(--atlas-text-muted);
  margin-bottom: 4px;
}

.exchange-info-item .value {
  font-size: 14px;
  font-weight: 500;
  color: var(--atlas-text);
}

/* Swap loading */
.swap-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--atlas-text-muted);
  gap: 12px;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--atlas-primary);
  border-right-color: var(--atlas-primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Swap error */
.swap-error {
  padding: 16px;
  border-radius: 12px;
  background-color: rgba(239, 68, 68, 0.1);
  border-left: 4px solid var(--atlas-error);
  color: var(--atlas-error);
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
}

.status-badge.pending {
  background-color: rgba(245, 158, 11, 0.2);
  color: var(--atlas-warning);
}

.status-badge.completed {
  background-color: rgba(16, 185, 129, 0.2);
  color: var(--atlas-success);
}

.status-badge.failed {
  background-color: rgba(239, 68, 68, 0.2);
  color: var(--atlas-error);
}

/* Multi-destination specific styling */
.quote-destinations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.quote-destination {
  background-color: var(--atlas-background-dark);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.destination-divider {
  border: none;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  margin: 12px 0;
}

.percentage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(59, 130, 246, 0.2);
  color: var(--atlas-primary);
  padding: 2px 6px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
}

/* Transaction data */
.blockchain-data {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  padding: 12px;
  background-color: var(--atlas-background-dark);
  border-radius: 8px;
  border: 1px solid var(--atlas-surface-light);
  overflow-x: auto;
  color: var(--atlas-text-muted);
}

.blockchain-data .address {
  color: var(--atlas-primary);
  word-break: break-all;
}

/* Multi-destination swap styling */
.multi-destination-toggle {
  display: flex;
  align-items: center;
  padding: 12px;
  background-color: var(--atlas-background-dark);
  border-radius: 8px;
  margin-bottom: 16px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.multi-destination-toggle input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  accent-color: var(--atlas-primary);
}

.multi-destination-toggle label {
  font-weight: 500;
  color: var(--atlas-text);
  cursor: pointer;
}

.destination-list {
  margin-top: 16px;
  margin-bottom: 20px;
}

.destination-item {
  background-color: var(--atlas-background-light);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.destination-item h4 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--atlas-text);
  font-size: 16px;
}

.destination-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--atlas-error);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.destination-remove:hover {
  background-color: rgba(239, 68, 68, 0.2);
  transform: scale(1.1);
}

.add-destination-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--atlas-primary);
  border: 1px dashed var(--atlas-primary);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.add-destination-button:hover {
  background-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* Wallet section */
.wallet-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px;
  background-color: var(--atlas-background-dark);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.wallet-status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--atlas-text);
}

.wallet-status .icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.wallet-status .icon.connected {
  background-color: var(--atlas-success);
  box-shadow: 0 0 5px var(--atlas-success);
}

.wallet-status .icon.disconnected {
  background-color: var(--atlas-error);
  box-shadow: 0 0 5px var(--atlas-error);
}

.wallet-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wallet-address {
  font-family: 'Space Mono', monospace;
  background-color: var(--atlas-background-lighter);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--atlas-text);
}

.wallet-network {
  font-size: 12px;
  color: var(--atlas-text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .form-section {
    padding: 16px;
  }
  
  .exchange-info {
    grid-template-columns: 1fr 1fr;
  }
  
  .wallet-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .wallet-status {
    width: 100%;
    justify-content: space-between;
  }
}