/* =============================================================
   CREDITS PAGE — Minimal additions over profile.css
   Shared dash- classes live in profile.css
   ============================================================= */

/* ── Credits Actions ── */
.credits-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.credits-buy-btn {
  width: 100%;
  justify-content: center;
}

.credits-link-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.credits-link-hint {
  font-size: 0.8rem;
  color: #475569;
  font-weight: 500;
}

/* ── Easing Variables ── */
:root {
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ── Entrance Keyframes ── */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ── Entrance: section stagger ── */
.balance-summary {
  animation: fadeSlideUp 0.6s var(--ease-out-quart) both;
}

.credits-actions {
  animation: fadeSlideUp 0.6s var(--ease-out-quart) 0.12s both;
}

.dash-section:first-of-type {
  animation: fadeSlideUp 0.6s var(--ease-out-quart) 0.24s both;
}

.dash-section:last-of-type {
  animation: fadeSlideUp 0.6s var(--ease-out-quart) 0.36s both;
}

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.card-grid-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  animation: fadeSlideUp 0.5s var(--ease-out-quart) both;
  transition:
    transform 0.4s var(--ease-out-quart),
    box-shadow 0.4s var(--ease-out-quart);
}

.card-grid-item:nth-child(1) { animation-delay: 0s; }
.card-grid-item:nth-child(2) { animation-delay: 0.08s; }
.card-grid-item:nth-child(3) { animation-delay: 0.16s; }
.card-grid-item:nth-child(4) { animation-delay: 0.24s; }
.card-grid-item:nth-child(5) { animation-delay: 0.32s; }
.card-grid-item:nth-child(6) { animation-delay: 0.40s; }

.card-grid-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-grid-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

.card-grid-serial {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.03em;
  word-break: break-all;
}

.card-grid-meta {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--secondary);
  margin-top: 0.2rem;
}

/* ── Balance Summary ── */
.balance-summary {
  text-align: center;
  padding: 1.75rem 1.5rem;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-subtle);
}

.balance-summary-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1;
  letter-spacing: -0.03em;
}

.balance-summary-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 0.3rem;
}

.balance-summary-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 0.15rem;
}

/* ── Link Card Form (inside results-modal) ── */
.link-form-group {
  margin-bottom: 1.25rem;
}

.link-form-group:last-child {
  margin-bottom: 0;
}

.link-form-group label {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.link-form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  font-size: 0.9rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: #fafbfc;
  color: var(--primary);
  transition: all 0.5s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
}

.link-form-group input::placeholder {
  color: #cbd5e1;
}

.link-form-group input:hover {
  border-color: rgba(0, 0, 0, 0.12);
  background: #fff;
}

.link-form-group input:focus {
  outline: none;
  border-color: rgba(8, 126, 139, 0.3);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 126, 139, 0.06);
}

.link-form-group small {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.4rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card-grid-item:hover {
    transform: none;
  }

  .dash-list-details {
    transition: none;
  }

  .dash-list-item--expandable.expanded .dash-list-details {
    transition: none;
  }
}

.dash-list-left {
  gap: 0.5rem;
}

/* ── Expandable Payment Rows ── */
.dash-list-item--expandable {
  cursor: pointer;
  flex-wrap: wrap;
}

.dash-list-item--expandable .dash-list-right svg {
  color: #c8d0da;
  transition: transform 0.3s var(--ease-out-quart);
  flex-shrink: 0;
}

.dash-list-item--expandable.expanded .dash-list-right svg {
  transform: rotate(180deg);
}

.dash-list-details {
  width: 100%;
  padding: 0 0 0.25rem;
  gap: 0.35rem;
  flex-direction: column;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.4s var(--ease-out-quart),
    opacity 0.35s var(--ease-out-quart),
    padding 0.35s var(--ease-out-quart);
  pointer-events: none;
}

.dash-list-item--expandable.expanded .dash-list-details {
  max-height: 300px;
  opacity: 1;
  padding: 0.75rem 0 0.25rem;
  overflow-y: auto;
  pointer-events: auto;
}

.dash-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 0.8rem;
}

.dash-detail-label {
  color: #94a3b8;
  font-weight: 500;
}

.dash-detail-value {
  color: var(--primary);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.dash-detail-value--completed {
  color: #059669;
}

.dash-detail-value--pending {
  color: #d97706;
}

.dash-detail-value--failed {
  color: #dc2626;
}
.dash-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #cbd5e1;
}

.dash-status-dot--completed {
  background: #059669;
}

.dash-status-dot--pending {
  background: #d97706;
}

.dash-status-dot--failed {
  background: #dc2626;
}

.dash-status-dot--processing {
  background: #2563eb;
}

/* ── Status Text ── */
.dash-status-text {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  letter-spacing: 0.02em;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.dash-status-text--completed {
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
}

.dash-status-text--pending {
  background: rgba(217, 119, 6, 0.08);
  color: #d97706;
}

.dash-status-text--failed {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}

.dash-status-text--processing {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
}
