/* Страница товара RCON-магазина (rcon_shop/product.tpl). Префикс rsp-. Палитра — как в шапке (css/header.css):
   тёмные панели, полупрозрачные линии, один акцент #da9256. */

.rsp {
	--rsp-panel: #232327;
	--rsp-inner: rgba(255, 255, 255, .04);
	--rsp-line: rgba(255, 255, 255, .07);
	--rsp-accent: #da9256;
	--rsp-accent-hi: #eda162;
	--rsp-text: #d4d4dc;
	--rsp-muted: #8e8e98;

	flex: 0 0 100%;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	color: var(--rsp-text);
}

/* ---------- вкладки категорий ---------- */

.rsp .rcon-shop-category-tabs {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin: 0 0 20px;
	padding: 8px;
	overflow-x: auto;
	border: 1px solid var(--rsp-line);
	border-radius: 16px;
	background: var(--rsp-panel);
	scrollbar-width: thin;
	scrollbar-color: rgba(218, 146, 86, .5) transparent;
}

.rsp .rcon-shop-category-tabs::-webkit-scrollbar { height: 4px; }
.rsp .rcon-shop-category-tabs::-webkit-scrollbar-track { background: transparent; }
.rsp .rcon-shop-category-tabs::-webkit-scrollbar-thumb { border-radius: 10px; background: rgba(218, 146, 86, .5); }

.rsp .rcon-shop-category-tab {
	display: inline-flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-width: max-content;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid transparent;
	border-radius: 12px;
	background: var(--rsp-inner);
	color: var(--rsp-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .02em;
	text-decoration: none !important;
	text-transform: uppercase;
	white-space: nowrap;
	transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.rsp .rcon-shop-category-tab:hover {
	border-color: rgba(218, 146, 86, .3);
	background: rgba(218, 146, 86, .08);
	color: #fff;
}

.rsp .rcon-shop-category-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .18);
	transition: background .15s ease, box-shadow .15s ease;
}

.rsp .rcon-shop-category-tab[aria-current="page"] {
	border-color: rgba(218, 146, 86, .35);
	background: rgba(218, 146, 86, .12);
	color: var(--rsp-accent-hi);
}

.rsp .rcon-shop-category-tab[aria-current="page"] .rcon-shop-category-dot {
	background: var(--rsp-accent);
	box-shadow: 0 0 10px rgba(218, 146, 86, .6);
}

/* ---------- раскладка: описание слева, покупка справа ---------- */

.rsp-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 20px;
	align-items: start;
}

.rsp-card {
	min-width: 0;
	padding: 24px;
	border: 1px solid var(--rsp-line);
	border-radius: 18px;
	background: var(--rsp-panel);
}

.rsp-buy {
	position: sticky;
	top: 96px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.rsp-eyebrow {
	margin-bottom: 4px;
	color: var(--rsp-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.rsp-title {
	margin: 0 0 18px;
	color: #fff;
	font-family: "Exo 2", "Montserrat", sans-serif;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.15;
}

.rsp-media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-height: 360px;
	margin: 0 0 20px;
	overflow: hidden;
	border: 1px solid var(--rsp-line);
	border-radius: 14px;
	background: radial-gradient(ellipse at 50% 45%, #34343a 0%, #1d1d21 75%);
}

.rsp-media img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 360px;
	object-fit: contain;
}

.rsp-desc {
	color: var(--rsp-text);
	font-size: 14px;
	line-height: 1.7;
	overflow-wrap: anywhere;
}

.rsp-desc img { max-width: 100%; height: auto; }

/* ---------- блок покупки ---------- */

.rsp-section {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rsp-label {
	color: #fff;
	font-size: 13px;
	font-weight: 700;
}

.rsp-link {
	display: block;
	margin-top: 3px;
	color: var(--rsp-accent) !important;
	font-size: 12px;
	font-weight: 500;
	text-decoration: none !important;
}

.rsp-link:hover { color: var(--rsp-accent-hi) !important; text-decoration: underline !important; }

.rsp-tariffs {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}

.rsp-tariffs .btn-group-toggle { display: block; margin: 0; padding: 0; }

.rsp-tariffs .rsp-tariff.btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 10px 16px;
	border: 1px solid var(--rsp-line) !important;
	border-radius: 12px;
	background: var(--rsp-inner) !important;
	box-shadow: none !important;
	color: var(--rsp-text) !important;
	font-size: 14px;
	text-align: left;
	opacity: 1;
	transition: background .15s ease, border-color .15s ease;
}

.rsp-tariffs .rsp-tariff.btn:hover {
	border-color: rgba(218, 146, 86, .4) !important;
	background: rgba(218, 146, 86, .07) !important;
}

.rsp-tariffs .rsp-tariff.btn.active {
	padding: 10px 16px !important; /* общий .btn.active раздувает отступы до 25px */
	border-color: var(--rsp-accent) !important;
	background: rgba(218, 146, 86, .14) !important;
	color: #fff !important;
}

.rsp-tariff input { position: absolute; opacity: 0; pointer-events: none; }
.rsp-tariff__title { font-weight: 600; }
.rsp-tariff__price { color: var(--rsp-accent-hi); font-weight: 700; white-space: nowrap; }

.rsp-params { display: flex; flex-direction: column; gap: 8px; margin: 0; }

.rsp .rsp-input.form-control {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	border: 1px solid var(--rsp-line);
	border-radius: 12px;
	background: var(--rsp-inner);
	box-shadow: none;
	color: #fff;
	font-size: 14px;
}

.rsp .rsp-input.form-control::placeholder { color: var(--rsp-muted); }
.rsp .rsp-input.form-control:focus { border-color: var(--rsp-accent); box-shadow: 0 0 0 3px rgba(218, 146, 86, .15); outline: 0; }

/* ошибки полей: остаются, пока игрок не начнёт печатать */
.rsp .rsp-input.form-control.input_error {
	border-color: #ff6b5e !important;
	box-shadow: 0 0 0 3px rgba(255, 96, 84, .14) !important;
}

.rsp .rsp-field-error,
.rsp .error_message {
	margin-top: -2px;
	color: #ff8a80;
	font-size: 12px;
	font-weight: 600;
}

@keyframes rsp-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

.rsp-check__box.rsp-shake {
	border-color: #ff6b5e;
	animation: rsp-shake .35s ease;
}

/* итог */

.rsp-summary {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	border: 1px solid var(--rsp-line);
	border-radius: 14px;
	background: var(--rsp-inner);
}

.rsp-summary__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
}

.rsp-summary__label { flex: 0 0 auto; color: var(--rsp-muted); font-size: 13px; }

.rsp-summary__value { color: #fff; font-size: 14px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.rsp-summary__price { color: var(--rsp-accent-hi); font-size: 24px; font-weight: 800; }

/* сервер — спокойная плашка в акцентном цвете, а не красная */
.rsp-summary .rsp-server,
.rcon-purchase-confirm-modal .rcon-confirm-server {
	display: inline-block;
	padding: 3px 10px;
	border: 1px solid rgba(218, 146, 86, .35);
	border-radius: 8px;
	background: rgba(218, 146, 86, .1);
	color: var(--rsp-accent-hi) !important;
	font-size: 13px;
	font-weight: 700;
}

/* чекбокс */


.rsp-check {
	position: relative;
	top: 0; /* общий стиль label сдвигает его вниз */
	left: 0;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	cursor: pointer;
	color: var(--rsp-muted);
	font-size: 13px;
	line-height: 1.45;
}

.rsp-check__input { position: absolute; opacity: 0; pointer-events: none; }

.rsp-check__box {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 6px;
	background: var(--rsp-inner);
	transition: background .15s ease, border-color .15s ease;
}

.rsp-check__input:checked + .rsp-check__box {
	border-color: var(--rsp-accent);
	background: var(--rsp-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23201208' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.rsp-check__input:focus-visible + .rsp-check__box { box-shadow: 0 0 0 3px rgba(218, 146, 86, .3); }

.rsp-check__text a { color: var(--rsp-accent) !important; font-weight: 600; }

/* кнопка. Старые правила сайта на hover/[onclick] ставят font-size 11px, opacity .7, радиус 11px и padding 0 25px
   с !important — поэтому ниже свои размеры тоже с !important, иначе при наведении кнопка «сдувается» */

.rsp .rsp-pay.btn,
.rsp .rsp-pay.btn:hover,
.rsp .rsp-pay.btn:focus,
.rsp .rsp-pay.btn:active {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 58px !important;
	margin: 0;
	padding: 0 18px !important;
	border: 0;
	border-radius: 14px !important;
	background: linear-gradient(180deg, #e9a265, #bd7332) !important;
	box-shadow: 0 8px 24px rgba(218, 146, 86, .3), inset 0 1px 0 rgba(255, 255, 255, .25) !important;
	color: #fff !important;
	font-size: 16px !important;
	font-weight: 800;
	letter-spacing: .01em;
	text-shadow: 0 1px 2px rgba(60, 30, 5, .35);
	opacity: 1 !important;
	transform: none;
	transition: box-shadow .15s ease, filter .15s ease;
}

.rsp .rsp-pay.btn:hover {
	filter: brightness(1.08);
	box-shadow: 0 10px 28px rgba(218, 146, 86, .42), inset 0 1px 0 rgba(255, 255, 255, .3) !important;
}

.rsp .rsp-pay.btn .rsp-pay__icon,
.rsp .rsp-pay.btn .rsp-pay__text,
.rsp .rsp-pay.btn .rsp-pay__price { color: #fff !important; }

.rsp .rsp-pay.btn .rsp-pay__icon { font-size: 22px !important; line-height: 1; }

/* сумма внутри кнопки — тёмная плашка справа */
.rsp .rsp-pay.btn .rsp-pay__price {
	margin-left: 4px;
	padding: 4px 10px;
	border-radius: 8px;
	background: rgba(50, 24, 4, .28);
	font-size: 14px !important;
	font-weight: 800;
	text-shadow: none;
	white-space: nowrap;
}

/* пока не отмечено согласие — та же кнопка, но приглушённая и без свечения */
.rsp .rsp-pay.btn.disabled,
.rsp .rsp-pay.btn.disabled:hover {
	box-shadow: none !important;
	cursor: not-allowed;
	filter: saturate(.7);
	opacity: .5 !important;
	pointer-events: auto;
}

.rsp .rsp-note { margin: 0; border-radius: 12px; }
.rsp .rsp-note p { margin: 0; }

/* ---------- окно подтверждения ---------- */

.rcon-purchase-confirm-modal { z-index: 11050; }

.rcon-purchase-confirm-modal .modal-content {
	margin-top: 0 !important;
	overflow: hidden;
	border-radius: 16px;
}

.rcon-purchase-confirm-modal .modal-title { font-size: 20px; font-weight: 800; }

.rcon-confirm-lead { margin-bottom: 14px; font-size: 15px; }

.rcon-confirm-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 13px 0;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.rcon-confirm-row:last-child { border-bottom: 0; }
.rcon-confirm-label { flex: 0 0 120px; color: #929292; font-size: 14px; }
.rcon-confirm-value, .rcon-confirm-price { color: #fff; font-size: 16px; text-align: right; }
.rcon-confirm-price { color: #eda162; font-size: 21px; }
.rcon-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- планшет и телефон ---------- */

@media (max-width: 991.98px) {
	.rsp-layout { grid-template-columns: minmax(0, 1fr); }
	.rsp-buy { position: static; }
}

@media (max-width: 575.98px) {
	.rsp .rcon-shop-category-tabs { gap: 6px; margin-bottom: 14px; padding: 6px; border-radius: 14px; }
	.rsp .rcon-shop-category-tab { flex: 0 0 auto; min-height: 40px; padding: 0 14px; font-size: 11px; }
	.rsp-layout { gap: 14px; }
	.rsp-card { padding: 16px; border-radius: 16px; }
	.rsp-title { font-size: 24px; }
	.rsp-media, .rsp-media img { max-height: 240px; }
	.rsp-summary__price { font-size: 22px; }

	.rcon-purchase-confirm-modal .modal-dialog { margin: 12px; }
	.rcon-confirm-row { display: block; }
	.rcon-confirm-label { display: block; margin-bottom: 6px; }
	.rcon-confirm-value, .rcon-confirm-price, .rcon-purchase-confirm-modal .rcon-confirm-server { display: inline-block; text-align: left; }
	.rcon-confirm-actions .btn { flex: 1 1 50%; }
}
