/* RR Lottery — Stage 13 scoped; не трогать глобальные селекторы */
body .rr-lottery-page {
	box-sizing: border-box;
	color: #e8e4dc;
	font-size: 15px;
	line-height: 1.5;
	max-width: 1100px;
	margin: 0 auto 3rem;
	padding: 0 12px;
}

body .rr-lottery-page *,
body .rr-lottery-page *::before,
body .rr-lottery-page *::after {
	box-sizing: border-box;
}

body .rr-lottery-hero {
	text-align: center;
	padding: 2.2rem 1rem 1.5rem;
	margin-bottom: 1.25rem;
	border-radius: 18px;
	background: radial-gradient(120% 100% at 50% 0%, #3a2a18 0%, #1a1410 55%, #0f0c0a 100%);
	border: 1px solid rgba(212, 168, 75, 0.35);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

body .rr-lottery-hero h1 {
	margin: 0 0 0.6rem;
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	letter-spacing: 0.06em;
	color: #f4d58d;
	text-transform: uppercase;
}

body .rr-lottery-hero__lead {
	margin: 0 auto;
	max-width: 46rem;
	color: #c9c2b6;
	font-size: 1rem;
}

body .rr-lottery-main-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.95fr);
	gap: 22px;
	align-items: start;
}

body .rr-lottery-left-stack,
body .rr-lottery-right-stack {
	display: flex;
	flex-direction: column;
	gap: 22px;
	min-width: 0;
}

body .rr-lottery-main-card,
body .rr-lottery-stack-section,
body .rr-lottery-purchase-card,
body .rr-lottery-winner-card {
	background: linear-gradient(160deg, #221c18 0%, #151210 100%);
	border: 1px solid rgba(212, 168, 75, 0.22);
	border-radius: 14px;
	padding: 1.1rem 1.15rem 1.25rem;
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

body .rr-lottery-card-head {
	margin-bottom: 0.75rem;
}

body .rr-lottery-card-head--split {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.65rem 1rem;
}

body .rr-lottery-draw-left-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.45rem 0.75rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 190, 80, 0.34);
	background: rgba(255, 190, 80, 0.1);
	color: #ffd36f;
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	max-width: 100%;
}

body .rr-lottery-purchase-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

body .rr-lottery-purchase-card__title {
	margin: 0 0 0.15rem;
	font-size: 1.05rem;
	color: #f0c86a;
}

body .rr-lottery-price-box {
	padding: 0.85rem 1rem;
	border-radius: 12px;
	border: 1px solid rgba(255, 190, 80, 0.18);
	background:
		radial-gradient(circle at 0% 0%, rgba(255, 190, 80, 0.1), transparent 38%),
		rgba(0, 0, 0, 0.22);
}

body .rr-lottery-price-label {
	font-size: 0.78rem;
	color: #9d958a;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

body .rr-lottery-price-value {
	margin-top: 0.35rem;
	font-size: 1.85rem;
	line-height: 1.15;
	font-weight: 800;
}

body .rr-lottery-purchase-card .rr-lottery-buy-card {
	background: transparent;
	border: none;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding-top: 1rem;
	margin-top: 0;
}

body .rr-lottery-purchase-card .rr-lottery-btn--primary {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
}

body .rr-lottery-pill {
	display: inline-block;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	font-size: 0.82rem;
	background: rgba(212, 168, 75, 0.15);
	color: #f0c86a;
	border: 1px solid rgba(212, 168, 75, 0.35);
}

body .rr-lottery-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 0.65rem;
	margin-bottom: 1rem;
}

body .rr-lottery-main-card .rr-lottery-stats {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

body .rr-lottery-stat {
	background: rgba(0, 0, 0, 0.25);
	border-radius: 10px;
	padding: 0.55rem 0.65rem;
	border: 1px solid rgba(255, 255, 255, 0.06);
}

body .rr-lottery-stat span {
	display: block;
	font-size: 0.78rem;
	color: #9d958a;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

body .rr-lottery-stat strong {
	display: block;
	margin-top: 0.15rem;
	font-size: 1.05rem;
	color: #f3eadc;
}

body .rr-lottery-progress {
	height: 9px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.42);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.06);
}

body .rr-lottery-progress-bar {
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #ffb020 0%, #ffd36f 100%);
	box-shadow: 0 0 14px rgba(255, 176, 32, 0.28);
	transition: width 0.35s ease;
}

body .rr-lottery-progress-caption {
	margin: 0.45rem 0 0;
	font-size: 0.88rem;
	color: #a9a29a;
}

body .rr-lottery-buy-card h3 {
	margin: 0 0 0.35rem;
	font-size: 1rem;
	color: #f0c86a;
}

body .rr-lottery-price {
	margin: 0;
	font-size: 1.75rem;
	font-weight: 700;
	color: #fff4dd;
}

body .rr-lottery-muted {
	color: #9d958a;
	margin: 0.35rem 0 0;
	font-size: 0.9rem;
}

body .rr-lottery-buy-row {
	margin-bottom: 0.65rem;
}

body .rr-lottery-label {
	display: block;
	font-size: 0.85rem;
	color: #c9c2b6;
	margin-bottom: 0.25rem;
}

body .rr-lottery-input {
	width: 100%;
	padding: 0.55rem 0.65rem;
	border-radius: 8px;
	border: 1px solid rgba(212, 168, 75, 0.35);
	background: rgba(0, 0, 0, 0.35);
	color: #f3eadc;
	font-size: 1rem;
}

body .rr-lottery-buy-sum {
	font-size: 0.95rem;
	color: #dcd4c8;
}

body .rr-lottery-btn {
	display: inline-block;
	margin-top: 0.35rem;
	padding: 0.55rem 1rem;
	border-radius: 10px;
	font-size: 0.95rem;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	border: 1px solid transparent;
	transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

body .rr-lottery-btn--primary {
	background: linear-gradient(180deg, #e3a542 0%, #b8741a 100%);
	color: #1a1208;
	font-weight: 600;
	border-color: rgba(255, 220, 160, 0.45);
}

body .rr-lottery-btn--primary:hover {
	opacity: 0.94;
}

body .rr-lottery-btn--primary:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

body .rr-lottery-btn--ghost {
	background: transparent;
	color: #f0c86a;
	border-color: rgba(212, 168, 75, 0.45);
}

body .rr-lottery-btn--ghost:hover {
	background: rgba(212, 168, 75, 0.08);
}

body .rr-lottery-btn--danger {
	background: linear-gradient(180deg, #a33 0%, #722 100%);
	color: #fff;
	border-color: rgba(255, 160, 140, 0.45);
}

body .rr-lottery-buy-disabled {
	padding: 0.5rem 0;
	color: #c9c2b6;
	font-size: 0.95rem;
}

body .rr-lottery-msg {
	margin-top: 0.65rem;
	font-size: 0.92rem;
}

body .rr-lottery-msg--ok {
	color: #8fd49a;
}

body .rr-lottery-msg--err {
	color: #f0a0a0;
}

body .rr-lottery-pending-banner {
	margin-bottom: 0.75rem;
	padding: 0.65rem 0.75rem;
	border: 1px solid rgba(255, 193, 7, 0.35);
	border-radius: 8px;
	background: rgba(255, 193, 7, 0.08);
}

body .rr-lottery-pending-banner__text {
	margin: 0 0 0.5rem;
	font-size: 0.9rem;
}

body .rr-lottery-pending-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

body .rr-lottery-finish {
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body .rr-lottery-stack-section {
	margin: 0;
}

body .rr-lottery-history h3,
body .rr-lottery-ticket-list h3,
body .rr-lottery-my-tickets h3,
body .rr-lottery-rules h3 {
	margin: 0 0 0.55rem;
	font-size: 1.05rem;
	color: #f0c86a;
}

body .rr-lottery-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

body .rr-lottery-table {
	width: 100%;
	min-width: 520px;
	border-collapse: collapse;
	font-size: 0.9rem;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.06);
}

body .rr-lottery-table th,
body .rr-lottery-table td {
	padding: 0.45rem 0.55rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	text-align: left;
}

body .rr-lottery-table th {
	background: rgba(212, 168, 75, 0.12);
	color: #f3eadc;
	font-weight: 600;
}

body .rr-lottery-last-purchases-list {
	max-height: 420px;
	overflow-y: auto;
	padding-right: 6px;
}

body .rr-lottery-recent {
	list-style: none;
	margin: 0;
	padding: 0;
}

body .rr-lottery-recent li {
	padding: 0.45rem 0.55rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	background: rgba(0, 0, 0, 0.18);
}

body .rr-lottery-recent-login {
	color: #f0c86a;
	font-weight: 600;
}

body .rr-lottery-rules-hint {
	margin: 0 0 0.5rem;
	padding: 0.45rem 0.6rem;
	border-radius: 8px;
	font-size: 0.82rem;
	line-height: 1.35;
	color: #e8dcc8;
	background: rgba(255, 190, 80, 0.08);
	border: 1px solid rgba(255, 190, 80, 0.16);
}

body .rr-lottery-rules ul {
	margin: 0.35rem 0 0;
	padding-left: 1.15rem;
	color: #c9c2b6;
	font-size: 0.88rem;
	line-height: 1.4;
}

body .rr-lottery-rules li + li {
	margin-top: 0.45rem;
}

body .rr-lottery-rules li {
	margin-bottom: 0;
}

body .rr-lottery-winner-card {
	position: relative;
	overflow: hidden;
}

body .rr-lottery-winner-badge {
	display: block;
	margin-bottom: 0.45rem;
	color: #ffd36f;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

body .rr-lottery-winner-draw {
	font-size: 0.92rem;
	color: #dcd4c8;
	margin-bottom: 0.35rem;
}

body .rr-lottery-winner-line {
	margin: 0.25rem 0;
	font-size: 1rem;
	color: #e8e4dc;
}

body .rr-lottery-winner-name {
	color: #ffd36f;
	font-weight: 800;
}

body .rr-lottery-winner-ticket {
	margin: 0.2rem 0;
	font-size: 0.95rem;
	color: #f3eadc;
	font-weight: 600;
}

body .rr-lottery-winner-date {
	margin: 0.35rem 0 0;
	font-size: 0.85rem;
}

body .rr-lottery-alert {
	padding: 0.85rem 1rem;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #dcd4c8;
	margin-bottom: 1rem;
}

body .rr-lottery-alert--error {
	border-color: rgba(255, 120, 120, 0.45);
	color: #ffc4c4;
}

body .rr-lottery-alert--warn {
	border-color: rgba(240, 200, 106, 0.45);
	color: #ffe8b0;
}

body .rr-lottery-loading {
	padding: 1rem;
	color: #9d958a;
}

/* =========================================================
   RR-GAME lottery layout polish
   ========================================================= */

@media (max-width: 1199.98px) {
	body .rr-lottery-main-layout {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767.98px) {
	body .rr-lottery-main-layout {
		display: flex;
		flex-direction: column;
		gap: 16px;
		align-items: stretch;
	}

	body .rr-lottery-left-stack,
	body .rr-lottery-right-stack {
		display: contents;
	}

	body .rr-lottery-main-card {
		order: 1;
	}

	body .rr-lottery-purchase-card {
		order: 2;
	}

	body .rr-lottery-rules-card {
		order: 3;
	}

	body .rr-lottery-my-tickets {
		order: 4;
	}

	body .rr-lottery-last-winner {
		order: 5;
	}

	body .rr-lottery-ticket-list {
		order: 6;
	}

	body .rr-lottery-history {
		order: 7;
	}

	body .rr-lottery-main-card .rr-lottery-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body .rr-lottery-price-value {
		font-size: 1.6rem;
	}

	body .rr-lottery-last-purchases-list {
		max-height: 360px;
	}

	body .rr-lottery-table {
		min-width: 440px;
	}
}

@media (max-width: 480px) {
	body .rr-lottery-main-card .rr-lottery-stats {
		grid-template-columns: 1fr;
	}
}

/* RR-GAME redesign — Lottery full upgrade */
body .rr-lottery-page .rr-lottery-stats--compact {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

body .rr-lottery-page .rr-lottery-stat--prize strong {
	color: #f4d58d;
	font-size: 1.35rem;
}

body .rr-lottery-page .rr-lottery-prize-note {
	margin: 0.25rem 0 0.5rem;
	font-size: 0.88rem;
	color: #b8b0a4;
}

body .rr-lottery-page .rr-lottery-status-badge {
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	font-size: 0.78rem;
	background: rgba(76, 175, 80, 0.18);
	border: 1px solid rgba(129, 199, 132, 0.45);
	color: #c8f0c9;
}

body .rr-lottery-page .rr-lottery-buy-meta {
	list-style: none;
	margin: 0 0 0.85rem;
	padding: 0;
	font-size: 0.9rem;
	color: #c9c2b6;
}

body .rr-lottery-page .rr-lottery-buy-meta li {
	margin: 0.2rem 0;
}

body .rr-lottery-page .rr-lottery-buy-reason {
	color: #ffb4b4;
	margin: 0 0 0.65rem;
}

body .rr-lottery-page .rr-lottery-ticket-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

body .rr-lottery-page .rr-lottery-ticket-tag {
	display: inline-block;
	padding: 0.2rem 0.5rem;
	border-radius: 6px;
	background: rgba(212, 168, 75, 0.15);
	border: 1px solid rgba(212, 168, 75, 0.35);
	font-size: 0.85rem;
	color: #f4d58d;
}

body .rr-lottery-page .rr-lottery-my-empty {
	padding: 0.65rem 0;
}

body .rr-lottery-page .rr-lottery-purchase-card--sticky {
	position: sticky;
	top: 88px;
}

body .rr-lottery-page .rr-lottery-recent-grouped {
	list-style: none;
	margin: 0;
	padding: 0;
}

body .rr-lottery-page .rr-lottery-recent-group {
	padding: 0.55rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body .rr-lottery-page .rr-lottery-recent-toggle {
	margin-top: 0.25rem;
	background: none;
	border: none;
	color: #d4a84b;
	cursor: pointer;
	font-size: 0.82rem;
	padding: 0;
}

body .rr-lottery-page .rr-lottery-recent-group__nums {
	margin-top: 0.25rem;
	font-size: 0.85rem;
	color: #b8b0a4;
}

body .rr-lottery-page .rr-lottery-modal {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

body .rr-lottery-page .rr-lottery-modal[hidden] {
	display: none !important;
}

body .rr-lottery-page .rr-lottery-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
}

body .rr-lottery-page .rr-lottery-modal__panel {
	position: relative;
	max-width: 520px;
	width: 100%;
	max-height: 85vh;
	overflow: auto;
	background: #1a1410;
	border: 1px solid rgba(212, 168, 75, 0.35);
	border-radius: 12px;
	padding: 1.1rem 1.2rem;
	color: #e8e4dc;
}

body .rr-lottery-page .rr-lottery-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.65rem;
	background: none;
	border: none;
	color: #f4d58d;
	font-size: 1.5rem;
	cursor: pointer;
}

body .rr-lottery-page .rr-lottery-modal__list {
	margin: 0.5rem 0;
	padding-left: 1.1rem;
}

@media (max-width: 1024px) {
	body .rr-lottery-page .rr-lottery-purchase-card--sticky {
		position: static;
	}
}
