/*
 * Estilos de front — CP B2B Manager.
 *
 * Sólo lo imprescindible: tabla de escalones, tabla de información, precio
 * oculto y la página "Status mayorista". Todo hereda tipografía y color del tema.
 */

/* =========================
   TABLA DE ESCALONES
   ========================= */

.cpb2b-tier-table {
	width: 100%;
	margin: 14px 0;
	border-collapse: collapse;
	font-size: 0.92em;
}

.cpb2b-tier-table th,
.cpb2b-tier-table td {
	padding: 8px 10px;
	text-align: left;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cpb2b-tier-table thead th {
	font-weight: 600;
	text-transform: none;
	white-space: nowrap;
}

.cpb2b-tier-table tbody tr:last-child th,
.cpb2b-tier-table tbody tr:last-child td {
	border-bottom: none;
}

.cpb2b-tier-table tbody tr.cpb2b-tier-active {
	background: rgba(37, 99, 235, 0.06);
}

.cpb2b-tier-table.b2bking_tiered_clickable tbody tr {
	cursor: pointer;
}

.cpb2b-tier-table.b2bking_tiered_clickable tbody tr:hover {
	background: rgba(0, 0, 0, 0.03);
}

/* =========================
   TABLA DE INFORMACIÓN
   ========================= */

.cpb2b-info-table {
	width: 100%;
	margin: 14px 0;
	border-collapse: collapse;
	font-size: 0.92em;
}

.cpb2b-info-table th,
.cpb2b-info-table td {
	padding: 7px 10px;
	text-align: left;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	vertical-align: top;
}

.cpb2b-info-table th {
	width: 40%;
	font-weight: 600;
}

/* =========================
   PRECIO OCULTO
   ========================= */

.cpb2b-hidden-price {
	display: inline-block;
	font-size: 0.95em;
	opacity: 0.85;
}

/* =========================
   PÁGINA "STATUS MAYORISTA"
   ========================= */

.cpb2b-status {
	max-width: 900px;
	margin: 0 auto 40px;
	padding: 24px;
	background: #ffffff;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
	border-radius: 18px;
	border: 1px solid rgba(0, 0, 0, 0.04);
}

.cpb2b-status__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}

.cpb2b-status__title {
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.cpb2b-status__subtitle {
	font-size: 14px;
	color: #667085;
}

.cpb2b-status__chip {
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	background: linear-gradient(135deg, #00c853, #64dd17);
	color: #fff;
	box-shadow: 0 8px 18px rgba(0, 200, 83, 0.35);
}

.cpb2b-status__chip--locked {
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	box-shadow: 0 8px 18px rgba(99, 102, 241, 0.35);
}

.cpb2b-status__bar {
	margin: 12px 0 10px;
	position: relative;
	height: 14px;
	border-radius: 999px;
	background: #edf1f7;
	overflow: hidden;
}

.cpb2b-status__bar-fill {
	height: 100%;
	width: var(--cpb2b-progress, 0%);
	border-radius: inherit;
	background: linear-gradient(90deg, #00c853, #64dd17, #00e5ff);
	box-shadow: 0 6px 16px rgba(0, 200, 83, 0.35);
	transition: width 0.7s ease-out;
}

.cpb2b-status__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	font-size: 13px;
	color: #667085;
	margin-bottom: 14px;
}

.cpb2b-status__meta strong {
	color: #111827;
}

.cpb2b-status__hint {
	font-size: 12px;
	color: #9ca3af;
	margin-bottom: 14px;
	display: none;
}

.cpb2b-status__cards {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	padding-bottom: 8px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.cpb2b-status__cards::-webkit-scrollbar {
	height: 4px;
}

.cpb2b-status__cards::-webkit-scrollbar-track {
	background: transparent;
}

.cpb2b-status__cards::-webkit-scrollbar-thumb {
	background: rgba(148, 163, 184, 0.6);
	border-radius: 999px;
}

.cpb2b-status__card {
	border-radius: 16px;
	overflow: hidden;
	background: #f9fafb;
	border: 1px solid rgba(15, 23, 42, 0.06);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	scroll-snap-align: center;
	flex: 0 0 82%;
	min-width: 260px;
	max-width: 320px;
}

.cpb2b-status__card img {
	width: 100%;
	display: block;
}

.cpb2b-status__card-body {
	padding: 10px 12px 12px;
}

.cpb2b-status__card-title {
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 4px;
}

.cpb2b-status__card-desc {
	font-size: 12px;
	color: #6b7280;
	line-height: 1.4;
}

.cpb2b-status__card-badge {
	display: inline-block;
	margin-top: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	background: #dcfce7;
	color: #166534;
}

.cpb2b-status__card--active {
	border-color: rgba(0, 200, 83, 0.75);
	box-shadow: 0 12px 30px rgba(0, 200, 83, 0.28);
	transform: translateY(-3px);
}

@media (max-width: 900px) {
	.cpb2b-status {
		padding: 18px;
	}
	.cpb2b-status__hint {
		display: block;
	}
}

@media (min-width: 901px) {
	.cpb2b-status__cards {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 14px;
		overflow: visible;
		scroll-snap-type: none;
	}
	.cpb2b-status__card {
		flex: initial;
		min-width: 0;
		max-width: none;
		scroll-snap-align: none;
	}
}

@media (prefers-color-scheme: dark) {
	.cpb2b-status {
		background: #111827;
		border-color: rgba(255, 255, 255, 0.08);
	}
	.cpb2b-status__card {
		background: #1f2937;
		border-color: rgba(255, 255, 255, 0.08);
	}
	.cpb2b-status__meta strong {
		color: #f9fafb;
	}
}
