/* Customer wallet — balance card and transaction history */

.shop-account-wallet-page {
  max-width: 920px;
}

.cust-wallet {
  display: grid;
  gap: 20px;
}

.cust-wallet-balance-card {
  position: relative;
  overflow: hidden;
  padding: 28px 24px 24px;
  border-radius: 20px;
  border: 1px solid rgba(198, 123, 78, 0.28);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, 0.22) 0%, transparent 55%),
    linear-gradient(135deg, #c67b4e 0%, #a8623d 48%, #8b4f32 100%);
  color: #fff;
  box-shadow:
    0 18px 40px rgba(139, 79, 50, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.cust-wallet-balance-card::before,
.cust-wallet-balance-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.cust-wallet-balance-card::before {
  width: 180px;
  height: 180px;
  top: -70px;
  left: -50px;
  background: rgba(255, 255, 255, 0.08);
}

.cust-wallet-balance-card::after {
  width: 120px;
  height: 120px;
  bottom: -40px;
  right: -20px;
  background: rgba(0, 0, 0, 0.08);
}

.cust-wallet-balance-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.cust-wallet-balance-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.9;
  margin-bottom: 6px;
}

.cust-wallet-balance-hint {
  font-size: 12px;
  line-height: 1.6;
  opacity: 0.82;
  max-width: 280px;
}

.cust-wallet-balance-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 22px;
  flex-shrink: 0;
}

.cust-wallet-balance-amount {
  position: relative;
  z-index: 1;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cust-wallet-balance-unit {
  font-size: 15px;
  font-weight: 700;
  opacity: 0.88;
  margin-right: 6px;
}

.cust-wallet-section {
  display: grid;
  gap: 12px;
}

.cust-wallet-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cust-wallet-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--dark);
}

.cust-wallet-section-meta {
  font-size: 12px;
  color: var(--g5);
  font-weight: 600;
}

.cust-wallet-tx-list {
  display: grid;
  gap: 10px;
}

.cust-wallet-tx {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--w);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cust-wallet-tx:hover {
  border-color: rgba(198, 123, 78, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.cust-wallet-tx-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 16px;
  flex-shrink: 0;
}

.cust-wallet-tx-icon--credit {
  background: rgba(34, 150, 83, 0.12);
  color: #1f8a4c;
}

.cust-wallet-tx-icon--debit {
  background: rgba(198, 76, 76, 0.1);
  color: #c44c4c;
}

.cust-wallet-tx-body {
  min-width: 0;
}

.cust-wallet-tx-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.45;
  margin-bottom: 4px;
}

.cust-wallet-tx-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--g5);
  font-weight: 600;
}

.cust-wallet-tx-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--g1);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
}

.cust-wallet-tx-side {
  text-align: left;
  flex-shrink: 0;
}

.cust-wallet-tx-amount {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.cust-wallet-tx-amount--credit {
  color: #1f8a4c;
}

.cust-wallet-tx-amount--debit {
  color: #c44c4c;
}

.cust-wallet-tx-balance {
  margin-top: 4px;
  font-size: 11px;
  color: var(--g5);
  font-weight: 600;
  white-space: nowrap;
}

.cust-wallet-tx-order-link {
  color: var(--a1, #c67b4e);
  text-decoration: none;
  font-weight: 700;
}

.cust-wallet-tx-order-link:hover {
  text-decoration: underline;
}

.cust-wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.cust-wallet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--w);
  color: var(--g6);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.cust-wallet-btn:hover {
  border-color: rgba(198, 123, 78, 0.45);
  color: var(--dark);
}

.cust-wallet-btn--primary {
  border-color: var(--a1, #c67b4e);
  background: rgba(198, 123, 78, 0.1);
  color: var(--a1, #c67b4e);
}

.cust-wallet-btn--primary:hover {
  background: rgba(198, 123, 78, 0.16);
}

.cust-wallet-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.cust-wallet-loading,
.cust-wallet-empty,
.cust-wallet-error {
  padding: 28px 20px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  background: var(--g1);
  text-align: center;
  color: var(--g5);
  font-size: 14px;
  font-weight: 600;
}

.cust-wallet-error {
  border-color: rgba(198, 76, 76, 0.35);
  color: #b33f3f;
  background: rgba(198, 76, 76, 0.06);
}

.cust-wallet-full-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

@media (max-width: 640px) {
  .cust-wallet-tx {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .cust-wallet-tx-side {
    grid-column: 2;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }
}
