/* ============================================================
   VDot Crypto Gateway – Checkout & Shortcodes v3
   Premium crypto checkout UI — Light mode
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --vc-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --vc-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --vc-primary: #2271b1;
  --vc-primary-light: rgba(34, 113, 177, 0.06);
  --vc-primary-hover: #135e96;
  --vc-success: #10b981;
  --vc-success-light: #ecfdf5;
  --vc-warning: #f59e0b;
  --vc-warning-light: #fffbeb;
  --vc-error: #ef4444;
  --vc-error-light: #fef2f2;
  --vc-surface: #ffffff;
  --vc-bg: #f8fafc;
  --vc-text: #0f172a;
  --vc-text-secondary: #64748b;
  --vc-text-muted: #94a3b8;
  --vc-border: #e2e8f0;
  --vc-border-strong: #cbd5e1;
  --vc-radius: 12px;
  --vc-radius-sm: 8px;
  --vc-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --vc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --vc-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Payment App Container ─────────────────────────────── */
#vdot-payment-app {
  max-width: 520px;
  margin: 0 auto;
  font-family: var(--vc-font);
  -webkit-font-smoothing: antialiased;
}

/* ─── Payment Card ──────────────────────────────────────── */
.vdot-payment-card {
  background: var(--vc-surface);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  box-shadow: var(--vc-shadow-md);
  overflow: hidden;
}

.vdot-payment-amount,
.vdot-payment-address,
.vdot-payment-qr {
  margin-top: 20px;
}

/* ─── Coin Selector ─────────────────────────────────────── */
.vdot-coins-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.vdot-coin-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid var(--vc-border);
  border-radius: var(--vc-radius-sm);
  cursor: pointer;
  transition: all var(--vc-transition);
  background: var(--vc-surface);
  position: relative;
  overflow: hidden;
}

.vdot-coin-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background var(--vc-transition);
}

.vdot-coin-option:hover {
  border-color: var(--vc-primary);
  background: var(--vc-primary-light);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.vdot-coin-option:hover::before {
  background: var(--vc-primary);
}

.vdot-coin-option.active {
  border-color: var(--vc-primary);
  background: var(--vc-primary-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.vdot-coin-option.active::before {
  background: linear-gradient(90deg, var(--vc-primary), #8b5cf6);
}

.vdot-coin-option.active::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  width: 18px;
  height: 18px;
  background: var(--vc-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.vdot-coin-option img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: transform var(--vc-transition);
}

.vdot-coin-option:hover img {
  transform: scale(1.08);
}

.vdot-coin-option span {
  font-weight: 600;
  font-size: 13px;
  color: var(--vc-text);
  line-height: 1.3;
}

/* ─── Network Selector ──────────────────────────────────── */
.vdot-network-selector {
  margin-top: 12px !important;
  margin-bottom: 16px;
}

.vdot-network-selector label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--vc-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.vdot-network-selector select {
  width: 100%;
  padding: 10px 36px 10px 14px;
  border: 2px solid var(--vc-border);
  border-radius: var(--vc-radius-sm);
  background: var(--vc-surface);
  color: var(--vc-text);
  font-family: var(--vc-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--vc-transition), box-shadow var(--vc-transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.vdot-network-selector select:focus {
  border-color: var(--vc-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

/* ─── Rate Info ─────────────────────────────────────────── */
.vdot-rate-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--vc-bg);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--vc-text-secondary);
  font-weight: 500;
}

.vdot-rate-info::before {
  content: '📊';
  font-size: 14px;
  flex-shrink: 0;
}

.vdot-rate-info strong {
  color: var(--vc-text);
  font-weight: 600;
}

/* ─── Error Message ─────────────────────────────────────── */
.vdot-error {
  background: var(--vc-error-light);
  color: #991b1b;
  padding: 14px 16px;
  border-radius: var(--vc-radius-sm);
  border: 1px solid #fecaca;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vdot-error::before {
  content: '⚠️';
  font-size: 14px;
  flex-shrink: 0;
}

/* ─── Copy Button ───────────────────────────────────────── */
.vdot-copy-btn {
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--vc-primary);
  background: var(--vc-primary-light);
  border: 1px solid transparent;
  transition: all var(--vc-transition);
  font-family: var(--vc-font);
}

.vdot-copy-btn:hover {
  background: var(--vc-primary);
  color: #fff;
  border-color: var(--vc-primary);
}

/* ─── Spinner ───────────────────────────────────────────── */
.vdot-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-top-color: var(--vc-primary);
  border-radius: 50%;
  animation: vdot-spin 0.8s linear infinite;
}

@keyframes vdot-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Status Badges ─────────────────────────────────────── */
.vdot-status-updating {
  background: var(--vc-warning) !important;
  transition: background-color 0.3s;
}

.vdot-status-success {
  background: var(--vc-success) !important;
  transition: background-color 0.3s;
}

.vdot-status-error {
  background: var(--vc-error) !important;
  transition: background-color 0.3s;
}

.vdot-status-expired {
  background: #64748b !important;
}

/* ─── WooCommerce Info Box Override ──────────────────────── */
#vdot-payment-app .woocommerce-info {
  border-top-color: var(--vc-primary);
  border-radius: var(--vc-radius-sm);
}

/* ─── Payment Description ──────────────────────────────── */
.payment_method_vdot_crypto_gateway p {
  font-size: 14px;
  color: var(--vc-text-secondary);
  line-height: 1.6;
}

/* ============================================================
   SHORTCODE STYLES
   ============================================================ */

/* ─── Tables (Prices, History, Balance) ─────────────────── */
.vdot-price-table,
.vdot-payment-history-table,
.vdot-wallet-balance-table,
.vdot-payment-status-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0;
  font-size: 14px;
  font-family: var(--vc-font);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius-sm);
  overflow: hidden;
}

.vdot-price-table th,
.vdot-price-table td,
.vdot-payment-history-table th,
.vdot-payment-history-table td,
.vdot-wallet-balance-table th,
.vdot-wallet-balance-table td,
.vdot-payment-status-table th,
.vdot-payment-status-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--vc-border);
}

.vdot-price-table tr:last-child td,
.vdot-payment-history-table tr:last-child td,
.vdot-wallet-balance-table tr:last-child td,
.vdot-payment-status-table tr:last-child td {
  border-bottom: none;
}

.vdot-price-table thead th,
.vdot-payment-history-table thead th,
.vdot-wallet-balance-table thead th {
  background: var(--vc-bg);
  font-weight: 600;
  color: var(--vc-text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--vc-border);
}

.vdot-price-table tbody tr:hover,
.vdot-payment-history-table tbody tr:hover,
.vdot-wallet-balance-table tbody tr:hover {
  background: var(--vc-bg);
}

.vdot-price-value {
  font-weight: 700;
  color: var(--vc-primary);
  font-family: var(--vc-mono);
  font-size: 14px;
}

/* ─── Price List ────────────────────────────────────────── */
.vdot-price-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.vdot-price-list li {
  padding: 12px 16px;
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  background: var(--vc-surface);
  transition: all var(--vc-transition);
}

.vdot-price-list li:hover {
  border-color: var(--vc-primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

.vdot-price-list li img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.vdot-price-list .vdot-price-value {
  margin-left: auto;
}

/* ─── Status & Balance Cards ────────────────────────────── */
.vdot-payment-status-card,
.vdot-wallet-balance-card {
  background: var(--vc-surface);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 20px;
  margin: 12px 0;
  box-shadow: var(--vc-shadow);
}

.vdot-payment-status-card h3,
.vdot-wallet-balance-card h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--vc-text);
  letter-spacing: -0.01em;
}

.vdot-payment-status-table th {
  width: 140px;
  font-weight: 600;
  color: var(--vc-text-secondary);
  font-size: 13px;
}

.vdot-payment-status-table code,
.vdot-wallet-balance-table code {
  font-size: 12px;
  font-family: var(--vc-mono);
  background: var(--vc-bg);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--vc-border);
  word-break: break-all;
  color: var(--vc-text);
}

/* ─── Calculator ────────────────────────────────────────── */
.vdot-calculator {
  background: var(--vc-surface);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 24px;
  max-width: 500px;
  margin: 12px 0;
  box-shadow: var(--vc-shadow);
}

.vdot-calc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--vc-text);
}

.vdot-calc-header img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.vdot-calc-rate {
  margin-left: auto;
  font-size: 12px;
  color: var(--vc-text-muted);
  font-weight: 500;
}

.vdot-calc-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.vdot-calc-input-group {
  flex: 1;
}

.vdot-calc-input-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--vc-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.vdot-calc-input-group input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--vc-border);
  border-radius: var(--vc-radius-sm);
  font-size: 16px;
  font-family: var(--vc-mono);
  font-weight: 600;
  color: var(--vc-text);
  box-sizing: border-box;
  transition: border-color var(--vc-transition), box-shadow var(--vc-transition);
}

.vdot-calc-input-group input:focus {
  border-color: var(--vc-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

.vdot-calc-arrow {
  font-size: 20px;
  padding-bottom: 10px;
  color: var(--vc-text-muted);
  font-weight: 300;
}

/* ─── Shortcode Status Badges ───────────────────────────── */
.vdot-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.vdot-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.vdot-status-completed {
  background: var(--vc-success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.vdot-status-completed::before {
  background: var(--vc-success);
}

.vdot-status-pending,
.vdot-status-detected,
.vdot-status-confirming {
  background: var(--vc-warning-light);
  color: #92400e;
  border: 1px solid #fde68a;
}

.vdot-status-pending::before,
.vdot-status-detected::before,
.vdot-status-confirming::before {
  background: var(--vc-warning);
}

.vdot-status-expired,
.vdot-status-failed {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.vdot-status-expired::before,
.vdot-status-failed::before {
  background: #94a3b8;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 600px) {
  .vdot-coins-selector {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .vdot-coin-option {
    padding: 10px 12px;
  }

  .vdot-coin-option span {
    font-size: 12px;
  }

  .vdot-calc-row {
    flex-direction: column;
    gap: 12px;
  }

  .vdot-calc-arrow {
    transform: rotate(90deg);
    text-align: center;
    padding: 0;
  }
}

@media (max-width: 480px) {
  #vdot-payment-app {
    max-width: 100%;
    padding: 0 8px;
  }

  .vdot-coins-selector {
    grid-template-columns: 1fr;
  }

  .vdot-payment-header h2 {
    font-size: 18px;
  }

  .vdot-payment-qr img {
    width: 160px !important;
    height: 160px !important;
  }
}