/**
 * Pokebank PRO Credits — frontend styles (cart/checkout panel + My Account tab).
 */

/* ------------------------------------------------------------------ */
/* Cart / checkout credit panel                                        */
/* ------------------------------------------------------------------ */

.pcp-credit-panel {
	background: #f8fafc;
	border: 1px solid #dbe3ec;
	border-left: 4px solid #2563eb;
	border-radius: 8px;
	padding: 16px 20px;
	margin: 0 0 24px;
	font-size: 0.95em;
}

.pcp-credit-panel--negative {
	border-left-color: #dc2626;
	background: #fef7f7;
}

.pcp-credit-panel__header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 1.05em;
}

.pcp-credit-panel__icon {
	color: #f59e0b;
}

.pcp-credit-panel__rows {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pcp-credit-panel__rows li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 4px 0;
}

.pcp-credit-panel__total {
	border-top: 1px solid #dbe3ec;
	margin-top: 6px;
	padding-top: 8px !important;
	font-weight: 600;
}

.pcp-credit-panel .pcp-amount {
	font-variant-numeric: tabular-nums;
}

.pcp-amount--positive {
	color: #15803d;
	font-weight: 600;
}

.pcp-amount--negative {
	color: #dc2626;
	font-weight: 700;
}

.pcp-credit-panel__warning {
	margin: 12px 0 0;
	padding: 10px 12px;
	background: #fee2e2;
	border-radius: 6px;
	color: #7f1d1d;
}

/* ------------------------------------------------------------------ */
/* My Account — Créditos PRO                                           */
/* ------------------------------------------------------------------ */

.pcp-account__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 28px;
}

.pcp-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pcp-card--balance {
	border-top: 4px solid #16a34a;
}

.pcp-card--balance.pcp-card--negative {
	border-top-color: #dc2626;
}

.pcp-card--balance.pcp-card--negative .pcp-card__value {
	color: #dc2626;
}

.pcp-card__label {
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #64748b;
	font-weight: 600;
}

.pcp-card__value {
	font-size: 1.7em;
	font-weight: 700;
	line-height: 1.2;
	color: #0f172a;
}

.pcp-card__hint {
	font-size: 0.85em;
	color: #64748b;
}

.pcp-account__heading {
	margin-bottom: 12px;
}

.pcp-account__empty {
	color: #64748b;
}

.pcp-movements .pcp-movements__amount {
	text-align: right;
}

.pcp-movements .pcp-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.78em;
	font-weight: 600;
	white-space: nowrap;
}

.pcp-movements .pcp-badge--recharge {
	background: #dcfce7;
	color: #166534;
}

.pcp-movements .pcp-badge--debit {
	background: #fee2e2;
	color: #991b1b;
}

.pcp-movements .pcp-badge--adjustment {
	background: #dbeafe;
	color: #1e40af;
}

.pcp-movements .pcp-badge--refund {
	background: #fef3c7;
	color: #92400e;
}

/* ------------------------------------------------------------------ */
/* Credit rows inside the native totals tables                         */
/* ------------------------------------------------------------------ */

.pcp-totals-row th,
.pcp-totals-row td {
	font-size: 0.92em;
	font-weight: 400;
}

.pcp-totals-row td {
	text-align: right;
}

.pcp-totals-row--header th {
	border-top: 2px solid rgba(0, 0, 0, 0.08);
	padding-top: 12px;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.8em;
	letter-spacing: 0.04em;
	color: #475569;
}

.pcp-totals-row__icon {
	color: #f59e0b;
	margin-right: 4px;
}

.pcp-totals-row--result th,
.pcp-totals-row--result td {
	font-weight: 700;
	border-bottom: 2px solid rgba(0, 0, 0, 0.08);
	padding-bottom: 12px;
}

.pcp-totals-row--warning td {
	background: #fee2e2;
	color: #7f1d1d;
	border-radius: 6px;
	font-size: 0.85em;
	text-align: left;
	padding: 10px 12px;
}

/* ------------------------------------------------------------------ */
/* "Pagar con créditos PRO" gateway summary (checkout payment box)     */
/* ------------------------------------------------------------------ */

.pcp-gateway-summary {
	list-style: none;
	margin: 10px 0 0;
	padding: 10px 12px;
	background: rgba(0, 0, 0, 0.03);
	border-radius: 6px;
	font-size: 0.92em;
}

.pcp-gateway-summary li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 3px 0;
}

.pcp-gateway-summary__result {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	margin-top: 4px;
	padding-top: 6px !important;
	font-weight: 600;
}

.pcp-gateway-summary__warning {
	margin: 10px 0 0;
	padding: 10px 12px;
	background: #fee2e2;
	border-radius: 6px;
	color: #7f1d1d;
	font-size: 0.88em;
}

/* ------------------------------------------------------------------ */
/* My Account dashboard balance card                                   */
/* ------------------------------------------------------------------ */

.pcp-dashboard-balance {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
	padding: 12px 18px;
	margin: 0 0 20px;
}

.pcp-dashboard-balance--negative {
	background: #fef2f2;
	border-color: #fecaca;
}

.pcp-dashboard-balance__label {
	font-weight: 600;
	color: #166534;
}

.pcp-dashboard-balance--negative .pcp-dashboard-balance__label {
	color: #991b1b;
}

.pcp-dashboard-balance__value {
	font-size: 1.25em;
	font-weight: 700;
}

.pcp-dashboard-balance__link {
	margin-left: auto;
	white-space: nowrap;
}

@media ( max-width: 600px ) {
	.pcp-credit-panel__rows li {
		flex-direction: column;
		gap: 2px;
	}

	.pcp-card__value {
		font-size: 1.4em;
	}
}

/* ================================================================== */
/* v2.0 — Tema Pokedollar (variables + componentes nuevos)            */
/* ================================================================== */

.pcp-account,
.pcp-credit-panel,
.pcp-dashboard-balance,
.pcp-gateway-summary,
.pcp-partial,
.pcp-menu-balance {
	--pcp-accent: #ffcb05;
	--pcp-accent-dark: #b38600;
	--pcp-ink: #1f2937;
}

/* Tarjeta de saldo estilo "tarjeta de socio". */
.pcp-account .pcp-card--balance {
	background: linear-gradient(135deg, var(--pcp-ink) 0%, #111827 100%);
	border-top: 4px solid var(--pcp-accent);
	border-color: var(--pcp-ink);
}

.pcp-account .pcp-card--balance .pcp-card__label {
	color: var(--pcp-accent);
}

.pcp-account .pcp-card--balance .pcp-card__value {
	color: #ffffff;
}

.pcp-account .pcp-card--balance .pcp-card__hint {
	color: #cbd5e1;
}

.pcp-account .pcp-card--balance.pcp-card--negative {
	border-top-color: #dc2626;
}

.pcp-account .pcp-card--balance.pcp-card--negative .pcp-card__value {
	color: #fca5a5;
}

.pcp-account .pcp-card--accum {
	border-top: 4px solid var(--pcp-accent);
}

.pcp-account .pcp-card--spent {
	border-top: 4px solid #94a3b8;
}

.pcp-credit-panel {
	border-left-color: var(--pcp-accent);
}

.pcp-credit-panel__icon,
.pcp-menu-balance__icon,
.pcp-empty__icon {
	color: var(--pcp-accent-dark);
}

/* Barra de progreso de gasto mensual. */
.pcp-progress {
	height: 8px;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	overflow: hidden;
	margin: 6px 0 2px;
}

.pcp-card:not(.pcp-card--balance) .pcp-progress {
	background: #e2e8f0;
}

.pcp-progress__fill {
	display: block;
	height: 100%;
	background: var(--pcp-accent);
	border-radius: 999px;
	transition: width 0.3s ease;
}

.pcp-progress__fill--negative {
	background: #dc2626;
}

/* Chip de plan e insignias de nivel. */
.pcp-plan-chip {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 999px;
	background: var(--pcp-ink);
	color: var(--pcp-accent);
	border: 2px solid var(--pcp-accent);
	font-size: 0.65em;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	vertical-align: middle;
}

.pcp-tier {
	display: inline-block;
	margin-top: 6px;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.78em;
	font-weight: 700;
	background: #f1f5f9;
	color: #475569;
	align-self: flex-start;
}

.pcp-tier--pokeball {
	background: #fee2e2;
	color: #b91c1c;
}

.pcp-tier--superball {
	background: #dbeafe;
	color: #1d4ed8;
}

.pcp-tier--ultraball {
	background: #fef3c7;
	color: #92400e;
}

.pcp-tier--masterball {
	background: #ede9fe;
	color: #6d28d9;
}

/* Mini gráfico "Tu año PRO". */
.pcp-userchart {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	height: 110px;
	padding: 10px 12px 4px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	margin-bottom: 6px;
}

.pcp-userchart__month {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	min-width: 0;
}

.pcp-userchart__bars {
	flex: 1;
	width: 100%;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 2px;
}

.pcp-userchart__bar {
	width: 40%;
	max-width: 14px;
	border-radius: 2px 2px 0 0;
}

.pcp-userchart__bar--recharge {
	background: var(--pcp-accent, #ffcb05);
}

.pcp-userchart__bar--debit {
	background: #94a3b8;
}

.pcp-userchart__label {
	font-size: 9px;
	color: #64748b;
	margin-top: 3px;
}

.pcp-userchart__legend {
	display: flex;
	gap: 14px;
	color: #64748b;
	font-size: 0.85em;
	margin: 0 0 18px;
}

.pcp-userchart__swatch {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	margin-right: 4px;
}

.pcp-userchart__swatch--recharge {
	background: #ffcb05;
}

.pcp-userchart__swatch--debit {
	background: #94a3b8;
}

/* Tabs CSS-only del historial. */
.pcp-tabs__radio {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.pcp-tabs__nav {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.pcp-tabs__tab {
	padding: 8px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.9em;
	background: #fff;
	transition: all 0.15s ease;
}

.pcp-tabs__count {
	display: inline-block;
	min-width: 20px;
	text-align: center;
	padding: 0 6px;
	margin-left: 4px;
	border-radius: 999px;
	background: #f1f5f9;
	font-size: 0.85em;
}

.pcp-tabs__panel {
	display: none;
}

#pcp-tab-cuotas:checked ~ .pcp-tabs__nav .pcp-tabs__tab--cuotas,
#pcp-tab-pedidos:checked ~ .pcp-tabs__nav .pcp-tabs__tab--pedidos,
#pcp-tab-otros:checked ~ .pcp-tabs__nav .pcp-tabs__tab--otros {
	background: var(--pcp-ink, #1f2937) !important;
	color: var(--pcp-accent, #ffcb05) !important;
	border-color: var(--pcp-ink, #1f2937) !important;
}

#pcp-tab-cuotas:checked ~ .pcp-tabs__nav .pcp-tabs__tab--cuotas .pcp-tabs__count,
#pcp-tab-pedidos:checked ~ .pcp-tabs__nav .pcp-tabs__tab--pedidos .pcp-tabs__count,
#pcp-tab-otros:checked ~ .pcp-tabs__nav .pcp-tabs__tab--otros .pcp-tabs__count {
	background: var(--pcp-accent, #ffcb05);
	color: var(--pcp-ink, #1f2937);
}

#pcp-tab-cuotas:checked ~ .pcp-tabs__panel--cuotas,
#pcp-tab-pedidos:checked ~ .pcp-tabs__panel--pedidos,
#pcp-tab-otros:checked ~ .pcp-tabs__panel--otros {
	display: block;
}

/* Estados vacíos. */
.pcp-empty {
	text-align: center;
	padding: 28px 16px;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	color: #64748b;
}

.pcp-empty__icon {
	font-size: 28px;
	display: block;
	margin-bottom: 6px;
}

/* Paginación del historial. */
.pcp-pagination {
	display: flex;
	align-items: center;
	gap: 12px;
	justify-content: center;
	margin: 16px 0;
}

.pcp-pagination__info {
	color: #64748b;
	font-size: 0.9em;
}

.pcp-account__actions {
	margin-top: 10px;
}

/* Pago parcial (checkout). */
.pcp-partial {
	background: #fffbeb;
	border: 1px solid var(--pcp-accent, #ffcb05);
	border-radius: 8px;
	padding: 12px 16px;
	margin: 0 0 16px;
}

.pcp-partial label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	cursor: pointer;
	margin: 0;
}

/* Chip de saldo en el menú. */
.pcp-menu-balance a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px !important;
	border-radius: 999px;
	background: var(--pcp-ink, #1f2937);
	color: var(--pcp-accent, #ffcb05) !important;
	font-weight: 700;
}

.pcp-menu-balance--negative a {
	background: #7f1d1d;
	color: #fecaca !important;
}

/* Tarjeta monedero del dashboard Mi Cuenta. */
.pcp-dashboard-balance {
	background: linear-gradient(135deg, var(--pcp-ink) 0%, #111827 100%);
	border: 1px solid var(--pcp-ink);
	border-left: 4px solid var(--pcp-accent);
}

.pcp-dashboard-balance__label {
	color: var(--pcp-accent);
}

.pcp-dashboard-balance__value {
	color: #ffffff;
}

.pcp-dashboard-balance__link {
	color: var(--pcp-accent);
}

.pcp-dashboard-balance--negative {
	border-left-color: #dc2626;
}

.pcp-dashboard-balance--negative .pcp-dashboard-balance__label {
	color: #fca5a5;
}

.pcp-shortcode {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}
