/* ============================================
   DXIP Buy Modal — Estilos
   ============================================ */

.buy-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.buy-modal {
  background: #0f1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.buy-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.buy-modal-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* Header */
.buy-header {
  margin-bottom: 1.5rem;
}

.buy-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
}

.buy-token-name {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.buy-wallet-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

.buy-dot-green {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
}

/* Steps */
.buy-step-block {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.buy-step-active {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.04);
}

.buy-step-done {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.04);
  opacity: 0.8;
}

.buy-step-locked {
  opacity: 0.4;
  pointer-events: none;
}

.buy-step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.buy-step-num {
  width: 24px;
  height: 24px;
  background: rgba(99,102,241,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #a5b4fc;
  flex-shrink: 0;
}

.buy-step-check {
  background: rgba(34,197,94,0.2);
  color: #4ade80;
}

.buy-step-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Form */
.buy-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.buy-form-row label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.buy-select,
.buy-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

.buy-select:focus,
.buy-input:focus {
  border-color: rgba(99,102,241,0.5);
}

.buy-select option {
  background: #1a1d2e;
}

.buy-estimate {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1rem;
  min-height: 1.4em;
  transition: color 0.2s;
}

.buy-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.4rem;
}

.buy-info-row strong {
  color: rgba(255,255,255,0.75);
}

/* Buttons */
.buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  width: 100%;
  margin-top: 1rem;
}

.buy-btn:active { transform: scale(0.98); }
.buy-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.buy-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
}

.buy-btn-primary:hover:not(:disabled) { opacity: 0.9; }

.buy-btn-secondary {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.12);
}

.buy-btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.12); }

/* States */
.buy-loading {
  text-align: center;
  padding: 2.5rem 1rem;
  color: rgba(255,255,255,0.6);
}

.buy-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(99,102,241,0.2);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: dxip-spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

.buy-info-block {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.buy-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.buy-icon-success { color: #4ade80; }
.buy-icon-warn    { color: #fbbf24; }
.buy-icon-error   { color: #f87171; }

.buy-info-block h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.buy-info-block p {
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.buy-info-block a {
  color: #a5b4fc;
}

/* ── Navbar wallet badge ─────────────────────────────────────── */

.nav-wallet-connected {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  color: #a5b4fc;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-wallet-connected:hover {
  background: rgba(99,102,241,0.25);
}

.nav-wallet-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Portfolio section ───────────────────────────────────────── */

.portfolio-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.portfolio-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.portfolio-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 0;
  color: rgba(255,255,255,0.45);
}

.portfolio-empty {
  text-align: center;
  padding: 2rem;
  color: rgba(255,255,255,0.4);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 12px;
}

.portfolio-notice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.portfolio-notice-warn {
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.25);
  color: #fbbf24;
}

.portfolio-notice-info {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  color: #a5b4fc;
}

/* ── Portfolio stats cards ───────────────────────────────────── */

.portfolio-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.pstat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s;
}

.pstat-card:hover {
  border-color: rgba(99,102,241,0.3);
}

.pstat-card-highlight {
  border-color: rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.06);
}

.pstat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.pstat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.pstat-unit {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
}

.pstat-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

/* ── Schedule cards ──────────────────────────────────────────── */

.schedules-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.schedule-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}

.schedule-card:hover {
  border-color: rgba(255,255,255,0.12);
}

.schedule-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.schedule-badge {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  border-radius: 6px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.schedule-claimable {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

.claimable-ready {
  color: #4ade80;
  font-weight: 600;
}

.schedule-amounts {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.6rem;
}

.schedule-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.schedule-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.schedule-dates {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}

.buy-link {
  background: none;
  border: none;
  color: #a5b4fc;
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  padding: 0;
}
