/**
 * 고객 캐시 관리 — Toss Design System
 * client/prepaid-wallet.php
 */

body.tds-theme .client-prepaid-wallet-page.page-content {
  background: var(--tds-bg-page);
  padding: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* ── 카드 ── */
body.tds-theme .client-prepaid-wallet-page .card {
  background: var(--tds-bg-surface);
  border: none;
  border-radius: var(--tds-radius-xl);
  box-shadow: none;
  padding: var(--tds-space-lg);
  margin-bottom: var(--tds-space-md);
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-section-title {
  margin: 0 0 var(--tds-space-md);
  font-size: var(--tds-typo4-size);
  font-weight: 700;
  color: var(--tds-text-primary);
  letter-spacing: -0.02em;
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--tds-space-md);
  flex-wrap: wrap;
  gap: var(--tds-space-sm);
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-section-head .client-prepaid-section-title {
  margin: 0;
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-count {
  font-size: var(--tds-typo7-size);
  color: var(--tds-text-secondary);
  font-weight: 500;
}

/* ── 보유 캐시 ── */
body.tds-theme .client-prepaid-wallet-page .client-prepaid-balance-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--tds-space-md);
  justify-content: space-between;
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-balance-amount {
  font-size: var(--tds-typo2-size);
  font-weight: 700;
  color: var(--tds-blue500);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-balance-hint {
  margin: var(--tds-space-xs) 0 0;
  font-size: var(--tds-typo7-size);
  color: var(--tds-text-secondary);
  line-height: 1.5;
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-balance-actions {
  display: flex;
  align-items: center;
  gap: var(--tds-space-sm);
  flex-wrap: wrap;
}

/* ── 버튼 ── */
body.tds-theme .client-prepaid-wallet-page .btn-primary,
body.tds-theme .client-prepaid-wallet-page .client-prepaid-open-btn.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--tds-blue500) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--tds-radius-md) !important;
  font-size: var(--tds-typo6-size) !important;
  font-weight: 600 !important;
  padding: 0.75rem 1.25rem !important;
  box-shadow: none !important;
  transform: none !important;
  transition: background 0.15s ease !important;
}

body.tds-theme .client-prepaid-wallet-page .btn-primary:hover,
body.tds-theme .client-prepaid-wallet-page .client-prepaid-open-btn.btn-primary:hover {
  background: var(--tds-blue600) !important;
  transform: none !important;
  box-shadow: none !important;
}

body.tds-theme .client-prepaid-wallet-page .btn-outline {
  background: var(--tds-bg-surface) !important;
  color: var(--tds-text-primary) !important;
  border: 1px solid var(--tds-border-default) !important;
  border-radius: var(--tds-radius-md) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease !important;
}

body.tds-theme .client-prepaid-wallet-page .btn-outline:hover {
  background: var(--tds-grey50) !important;
  transform: none !important;
  box-shadow: none !important;
}

body.tds-theme .client-prepaid-wallet-page .btn-sm {
  padding: 0.5rem 0.875rem !important;
  font-size: var(--tds-typo7-size) !important;
}

/* ── 내역 테이블 ── */
body.tds-theme .client-prepaid-wallet-page .table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

body.tds-theme .client-prepaid-wallet-page .table thead tr {
  background: var(--tds-grey50);
  border-bottom: 1px solid var(--tds-border-light);
}

body.tds-theme .client-prepaid-wallet-page .table th {
  padding: var(--tds-space-sm) var(--tds-space-md);
  font-size: var(--tds-typo7-size);
  font-weight: 600;
  color: var(--tds-text-secondary);
  text-align: left;
  border: none;
}

body.tds-theme .client-prepaid-wallet-page .table tbody tr {
  border-bottom: 1px solid var(--tds-border-light);
  transition: background 0.15s ease;
}

body.tds-theme .client-prepaid-wallet-page .table tbody tr:hover {
  background: var(--tds-grey50);
}

body.tds-theme .client-prepaid-wallet-page .table td {
  padding: var(--tds-space-md);
  font-size: var(--tds-typo7-size);
  color: var(--tds-text-primary);
  border: none;
  vertical-align: middle;
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-ledger-date {
  white-space: nowrap;
  color: var(--tds-text-secondary);
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-ledger-memo {
  font-size: var(--tds-typo7-size);
  color: var(--tds-text-secondary);
  max-width: 280px;
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-delta--plus {
  font-weight: 600;
  color: var(--tds-green600);
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-delta--minus {
  font-weight: 600;
  color: var(--tds-red600);
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-balance-cell {
  font-weight: 600;
  color: var(--tds-text-primary);
}

/* ── 페이지네이션 ── */
body.tds-theme .client-prepaid-wallet-page .client-prepaid-pagination {
  margin-top: var(--tds-space-md);
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-pagination .btn-secondary {
  background: var(--tds-grey100) !important;
  color: var(--tds-text-secondary) !important;
  border: none !important;
  border-radius: var(--tds-radius-md) !important;
  font-weight: 600 !important;
  min-width: 2.25rem;
  text-align: center;
  box-shadow: none !important;
  transition: background 0.15s ease, color 0.15s ease !important;
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-pagination .btn-secondary:hover {
  background: var(--tds-grey200) !important;
  color: var(--tds-text-primary) !important;
  transform: none !important;
}

body.tds-theme .client-prepaid-wallet-page .client-prepaid-pagination .btn-secondary[style*="pointer-events"] {
  background: var(--tds-blue500) !important;
  color: #fff !important;
}

/* ── 빈 상태 ── */
body.tds-theme .client-prepaid-wallet-page .client-dash-empty-panel {
  text-align: center;
  padding: var(--tds-space-2xl) var(--tds-space-lg);
  color: var(--tds-text-secondary);
}

body.tds-theme .client-prepaid-wallet-page .client-dash-empty-panel p {
  margin: 0;
  font-size: var(--tds-typo6-size);
  color: var(--tds-text-secondary);
}

@media (max-width: 768px) {
  body.tds-theme .client-prepaid-wallet-page .card {
    padding: var(--tds-space-md);
    border-radius: var(--tds-radius-lg);
  }

  body.tds-theme .client-prepaid-wallet-page .client-prepaid-balance-row {
    flex-direction: column;
    align-items: stretch;
  }

  body.tds-theme .client-prepaid-wallet-page .client-prepaid-balance-actions {
    width: 100%;
  }

  body.tds-theme .client-prepaid-wallet-page .client-prepaid-balance-actions .btn {
    flex: 1;
    justify-content: center;
  }
}
