/* ========== BUY CRYPTO PAGE ========== */

.buy-main {
  padding: 28px 40px 80px;
}

/* Page Header */
.buy-page-header {
  margin-bottom: 28px;
}

.buy-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 10px;
}

.buy-breadcrumb a {
  color: #5a5a6a;
  text-decoration: none;
  transition: color 0.15s;
}

.buy-breadcrumb a:hover {
  color: #5cb8e6;
}

.buy-breadcrumb svg {
  color: #3a3a4a;
}

.buy-breadcrumb span {
  color: #8a8a9a;
}

.buy-page-title {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #e0e0e8;
  margin: 0 0 6px;
}

.buy-page-sub {
  font-size: 14px;
  color: #6a6a7a;
  margin: 0;
}

/* Layout */
.buy-layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 20px;
  align-items: start;
}

/* Card Base */
.buy-card {
  background: #1a1a1f;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px;
}

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

.buy-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #e0e0e8;
}

/* Search */
.buy-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 6px 12px;
  transition: border-color 0.15s;
}

.buy-search-wrap:focus-within {
  border-color: rgba(92, 184, 230, 0.3);
}

.buy-search-wrap svg {
  color: #4a4a5a;
  flex-shrink: 0;
}

.buy-search {
  background: none;
  border: none;
  color: #e0e0e8;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  width: 140px;
}

.buy-search::placeholder {
  color: #4a4a5a;
}

/* Quick Pills */
.buy-quick-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.quick-pill {
  padding: 6px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  color: #8a8a9a;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-pill:hover {
  color: #e0e0e8;
  border-color: rgba(255,255,255,0.12);
}

.quick-pill.active {
  color: #5cb8e6;
  border-color: rgba(92, 184, 230, 0.3);
  background: rgba(92, 184, 230, 0.08);
}

/* Asset List */
.buy-asset-list {
  max-height: 520px;
  overflow-y: auto;
}

.buy-asset-list::-webkit-scrollbar {
  width: 4px;
}

.buy-asset-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
}

.buy-asset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.buy-asset-row:hover {
  background: rgba(255,255,255,0.03);
}

.buy-asset-row.selected {
  background: rgba(92, 184, 230, 0.06);
  border-color: rgba(92, 184, 230, 0.15);
}

.buy-asset-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.buy-asset-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.buy-asset-icon.btc { background: linear-gradient(135deg, #f7931a, #e8840f); }
.buy-asset-icon.eth { background: linear-gradient(135deg, #627eea, #5470d6); }
.buy-asset-icon.sol { background: linear-gradient(135deg, #9945ff, #14f195); color: #fff; }
.buy-asset-icon.xrp { background: linear-gradient(135deg, #23292f, #3a4148); }
.buy-asset-icon.bnb { background: linear-gradient(135deg, #f3ba2f, #e0a820); }
.buy-asset-icon.doge { background: linear-gradient(135deg, #c3a634, #b89a20); }
.buy-asset-icon.ada { background: linear-gradient(135deg, #0033ad, #0044cc); }
.buy-asset-icon.avax { background: linear-gradient(135deg, #e84142, #d63637); }
.buy-asset-icon.link { background: linear-gradient(135deg, #2a5ada, #1e4fc4); }
.buy-asset-icon.dot { background: linear-gradient(135deg, #e6007a, #cc006b); }

.buy-asset-name {
  font-size: 14px;
  font-weight: 600;
  color: #e0e0e8;
}

.buy-asset-ticker {
  font-size: 12px;
  color: #6a6a7a;
  margin-top: 1px;
}

.buy-asset-right {
  text-align: right;
}

.buy-asset-price {
  font-size: 14px;
  font-weight: 600;
  color: #e0e0e8;
  font-variant-numeric: tabular-nums;
}

.buy-asset-change {
  font-size: 12px;
  font-weight: 500;
  margin-top: 1px;
}

.buy-asset-change.positive { color: #4ecb71; }
.buy-asset-change.negative { color: #e65c5c; }

/* ========== PURCHASE PANEL ========== */
.buy-form-card {
  position: sticky;
  top: 80px;
}

/* Selected Asset Header */
.buy-selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 20px;
}

.buy-selected-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.buy-selected-name {
  font-size: 16px;
  font-weight: 700;
  color: #e0e0e8;
}

.buy-selected-price {
  font-size: 13px;
  color: #8a8a9a;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.buy-selected-change {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
}

.buy-selected-change.positive {
  color: #4ecb71;
  background: rgba(78, 203, 113, 0.1);
}

.buy-selected-change.negative {
  color: #e65c5c;
  background: rgba(230, 92, 92, 0.1);
}

/* Input Fields */
.buy-field {
  margin-bottom: 4px;
}

.buy-field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: #6a6a7a;
  margin-bottom: 8px;
}

.buy-field-balance {
  color: #5a5a6a;
  font-variant-numeric: tabular-nums;
}

.buy-field-hint {
  color: #4a4a5a;
  font-style: italic;
}

.buy-input-row {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  transition: border-color 0.15s;
}

.buy-input-row:focus-within {
  border-color: rgba(92, 184, 230, 0.3);
}

.buy-amount-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: #e0e0e8;
  font-size: 20px;
  font-weight: 700;
  padding: 16px 16px;
  outline: none;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
}

.buy-amount-input.receive {
  color: #5cb8e6;
}

.buy-amount-input::placeholder {
  color: #3a3a4a;
}

.buy-currency-badge {
  padding: 8px 14px;
  margin-right: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #8a8a9a;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.buy-currency-badge.crypto {
  color: #5cb8e6;
  background: rgba(92, 184, 230, 0.1);
}

/* Quick Amounts */
.buy-quick-amounts {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.buy-quick-amt {
  flex: 1;
  padding: 7px 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  color: #6a6a7a;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.buy-quick-amt:hover {
  color: #e0e0e8;
  border-color: rgba(255,255,255,0.12);
}

.buy-quick-amt.active {
  color: #5cb8e6;
  border-color: rgba(92, 184, 230, 0.3);
  background: rgba(92, 184, 230, 0.06);
}

/* Swap Divider */
.buy-swap-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}

.buy-swap-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6a6a7a;
}

/* ========== PAYMENT METHOD ========== */
.buy-payment-section {
  margin-top: 20px;
  margin-bottom: 20px;
}

.buy-payment-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.buy-payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.buy-payment-option:hover {
  background: rgba(255,255,255,0.04);
}

.buy-payment-option.selected {
  background: rgba(92, 184, 230, 0.04);
  border-color: rgba(92, 184, 230, 0.2);
}

.buy-payment-option input[type="radio"] {
  display: none;
}

.payment-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s;
}

.buy-payment-option.selected .payment-radio {
  border-color: #5cb8e6;
}

.buy-payment-option.selected .payment-radio::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  border-radius: 50%;
  background: #5cb8e6;
}

.payment-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payment-icon.wallet {
  background: rgba(92, 184, 230, 0.1);
  color: #5cb8e6;
}

.payment-icon.stable {
  background: rgba(78, 203, 113, 0.1);
  color: #4ecb71;
}

.payment-icon.card {
  background: rgba(168, 168, 184, 0.1);
  color: #a8a8b8;
}

.payment-info {
  flex: 1;
}

.payment-name {
  font-size: 13px;
  font-weight: 600;
  color: #e0e0e8;
}

.payment-detail {
  font-size: 11px;
  color: #5a5a6a;
  margin-top: 2px;
}

.payment-fee {
  font-size: 11px;
  font-weight: 600;
  color: #8a8a9a;
  background: rgba(255,255,255,0.04);
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ========== ORDER SUMMARY ========== */
.buy-summary {
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 20px;
}

.buy-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #6a6a7a;
  padding: 5px 0;
}

.buy-summary-row span:last-child {
  color: #a8a8b8;
  font-variant-numeric: tabular-nums;
}

.buy-summary-row.total {
  color: #e0e0e8;
  font-weight: 700;
  font-size: 14px;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.buy-summary-row.total span:last-child {
  color: #e0e0e8;
}

/* ========== BUY BUTTON ========== */
.buy-submit-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  font-family: inherit;
  background: linear-gradient(135deg, #4ecb71, #3dba60);
  color: #fff;
}

.buy-submit-btn:hover {
  background: linear-gradient(135deg, #5dd97f, #4ecb71);
  box-shadow: 0 4px 24px rgba(78, 203, 113, 0.3);
  transform: translateY(-1px);
}

.buy-submit-btn:active {
  transform: translateY(0);
}

.buy-disclaimer {
  font-size: 11px;
  color: #4a4a5a;
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .buy-main {
    padding: 20px 20px 60px;
  }
  .buy-layout {
    grid-template-columns: 1fr;
  }
  .buy-form-card {
    position: static;
  }
}

@media (max-width: 600px) {
  .buy-main {
    padding: 16px 16px 60px;
  }
  .buy-page-title {
    font-size: 22px;
  }
  .buy-amount-input {
    font-size: 18px;
    padding: 14px 14px;
  }
  .buy-quick-amounts {
    flex-wrap: wrap;
  }
  .buy-quick-amt {
    flex: 0 0 calc(33.33% - 4px);
  }
}
