/* Кастомные дополнения к оригинальному slim-шаблону rcon_shop (slim1) */

.rcon-shop-card.card-service > .card-bg-img {
	position: relative !important;
	overflow: hidden;
}

.rcon-shop-card.card-service > .card-bg-img .remaining-quantity {
	position: absolute;
	top: auto;
	left: auto;
	bottom: 10px;
	right: 10px;
	margin: 0;
}

.rcon-product-image {
	position: relative;
	max-width: 100%;
	display: block;
}

.rcon-product-image .remaining-quantity {
	position: absolute;
	top: auto;
	left: auto;
	bottom: 10px;
	right: 10px;
	margin: 0;
}

.rcon-product-image-img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 8px;
}

.rcon-shop-card .card-bg-img .remaining-quantity,
.rcon-product-image .remaining-quantity {
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	color: #fff !important;
	text-align: center;
	min-width: 0;
	width: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	z-index: 2;
	white-space: nowrap;
}

.quantity-soldout::before,
.quantity-available::before,
.quantity-infinite::before {
	margin-right: 4px;
	font-size: 12px;
}

.quantity-soldout::before { content: "⛔ "; }
.quantity-available::before { content: "✅ "; }
.quantity-infinite::before { content: "♾️ "; }

.quantity-soldout {
	background-color: rgb(251, 71, 75);
	border: 1px solid rgba(251, 71, 75, 0.5);
}

.quantity-available {
	background-color: rgba(46, 125, 50, 0.9);
	border: 1px solid rgba(46, 125, 50, 0.5);
}

.quantity-infinite {
	background-color: rgba(46, 125, 50, 0.9);
	border: 1px solid rgba(46, 125, 50, 0.5);
}

/* Профиль / история покупок */
.rcon-slim-hint {
	color: rgb(165, 169, 180);
	font-size: 0.875em;
}

.rcon-profile-block {
	color: rgb(165, 169, 180);
}

.rcon-profile-header {
	display: flex;
	align-items: center;
	gap: 12px;
}

.rcon-profile-header-icon,
.rcon-header-icon-square {
	width: 40px;
	height: 40px;
	background: rgb(251, 71, 75);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 16px;
	flex-shrink: 0;
}

.rcon-profile-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: #fff;
}

.rcon-row-value {
	color: #fff;
	font-weight: 500;
	font-size: 15px;
}

.rcon-purchase-row {
	background: rgb(36, 39, 49);
	border: 1px solid rgb(35, 39, 50);
}

.rcon-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	background: rgb(36, 39, 49);
	border: 1px solid rgb(35, 39, 50);
	border-radius: 8px;
	text-align: center;
	color: rgb(165, 169, 180);
}

.rcon-empty-icon {
	font-size: 32px;
	color: rgb(165, 169, 180);
	margin-bottom: 12px;
}

.rcon-empty-text {
	font-weight: 500;
}

.rcon-tabs.tabs {
	display: flex;
	margin-bottom: 20px;
	border-bottom: 1px solid rgb(35, 39, 50);
	gap: 4px;
}

.rcon-tabs .tab-btn {
	padding: 10px 18px;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	color: rgb(165, 169, 180);
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 500;
	transition: all 0.2s ease;
	margin-bottom: -1px;
}

.rcon-tabs .tab-btn:hover {
	color: #fff;
}

.rcon-tabs .tab-btn.active {
	color: rgb(251, 71, 75);
	border-bottom-color: rgb(251, 71, 75);
}

.rcon-purchases-table {
	width: 100%;
	background: rgb(36, 39, 49);
	border: 1px solid rgb(35, 39, 50);
	border-radius: 8px;
	overflow: hidden;
}

.rcon-purchases-table table {
	width: 100%;
	border-collapse: collapse;
}

.rcon-purchases-table th,
.rcon-purchases-table td {
	padding: 16px 15px;
	text-align: left;
	border-bottom: 1px solid rgb(35, 39, 50);
}

.rcon-purchases-table th {
	background: rgb(27, 29, 36);
	font-weight: 600;
	color: rgb(165, 169, 180);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.rcon-purchases-table tr:last-child td {
	border-bottom: none;
}

.rcon-purchases-table tr.rcon-expired-row {
	background: rgba(251, 71, 75, 0.06);
}

.rcon-purchases-table .rcon-title,
.rcon-purchases-table td p {
	font-size: 1rem;
	margin: 0;
	color: #fff;
	font-weight: 500;
}

.rcon-purchases-table .rcon-desc,
.rcon-purchases-table td span {
	font-size: 0.8rem;
	color: rgb(165, 169, 180);
	margin: 0;
}

.rcon-loading-history,
.loading-history {
	text-align: center;
	padding: 40px;
	color: rgb(165, 169, 180);
	font-style: italic;
}

.history-stats {
	background: rgb(27, 29, 36);
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 15px;
	text-align: center;
	color: rgb(165, 169, 180);
	font-weight: 500;
	border: 1px solid rgb(35, 39, 50);
}

.history-stats strong {
	color: #fff;
}

.purchase-history-list {
	display: grid;
	gap: 10px;
}

.history-item {
	display: grid;
	grid-template-columns: 2fr 1fr 2fr 1fr;
	gap: 12px;
	padding: 16px;
	background: rgb(36, 39, 49);
	border-radius: 8px;
	border: 1px solid rgb(35, 39, 50);
	align-items: center;
}

.history-item.active { border-left: 4px solid rgb(46, 125, 50); }
.history-item.expired { border-left: 4px solid rgb(251, 71, 75); }
.history-item.permanent { border-left: 4px solid rgb(251, 71, 75); }

.history-product strong {
	color: #fff;
	display: block;
	margin-bottom: 5px;
}

.history-tarif,
.history-dates {
	color: rgb(165, 169, 180);
	font-size: 0.9em;
}

.history-price {
	font-weight: bold;
	color: rgb(251, 71, 75);
	text-align: center;
}

.history-status {
	text-align: center;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 0.85em;
	font-weight: bold;
}

.history-status.active {
	background: rgba(46, 125, 50, 0.2);
	color: #81c784;
}

.history-status.expired,
.history-status.permanent {
	background: rgba(251, 71, 75, 0.15);
	color: rgb(251, 71, 75);
}

@media (max-width: 1200px) {
	.history-item {
		grid-template-columns: 1fr 1fr;
	}
	.history-dates {
		grid-column: span 2;
	}
}

@media (max-width: 768px) {
	.history-item {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.history-dates {
		grid-column: span 1;
	}
	.rcon-purchases-table {
		overflow-x: auto;
	}
}
