/*
 * Модуль «Розыгрыши» — оформление для шаблона standart.
 * Цвета: тёмная подложка сайта, бирюзовый из логотипа для действия,
 * янтарный (цвет таймера раунда в CS 1.6) — для обратного отсчёта.
 */

.gw-hero,
.gw-past,
.gw-empty,
.gw-page {
	--gw-night: #151726;
	--gw-panel: #1f2233;
	--gw-line: rgba(255, 255, 255, 0.09);
	--gw-text: #eef1f7;
	--gw-muted: #a2abc0;
	--gw-teal: #1fcfa8;
	--gw-teal-dark: #12a585;
	--gw-amber: #ffb21a;
}

/* Слайдер скрыт, пока на его месте показан розыгрыш */
.gw-slider-wait {
	display: none !important;
}

/* ---------- Большой блок розыгрыша ---------- */

.gw-hero {
	position: relative;
	display: flex;
	align-items: stretch;
	min-height: 340px;
	margin-bottom: 30px;
	overflow: hidden;
	border-radius: 4px;
	background-color: var(--gw-night);
	background-size: cover;
	background-position: 70% center;
	color: var(--gw-text);
}

/* затемнение картинки: слева плотное под текст, справа — под таймер */
.gw-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(21, 23, 38, 0.96) 0%, rgba(21, 23, 38, 0.88) 40%, rgba(21, 23, 38, 0.5) 58%, rgba(21, 23, 38, 0.8) 74%, rgba(21, 23, 38, 0.9) 100%);
}

.gw-hero > * {
	position: relative;
}

.gw-hero__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	padding: 38px 20px 30px 44px;
}

.gw-hero__kind {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 500;
	color: var(--gw-teal);
}

.gw-hero__title {
	margin: 0 0 14px;
	max-width: 17em;
	font-size: 34px;
	line-height: 1.16;
	font-weight: 700;
	color: #fff;
	overflow-wrap: anywhere;
}

.gw-hero__prize {
	margin: 0 0 12px;
	font-size: 17px;
	line-height: 1.45;
	color: var(--gw-text);
}

.gw-hero__prize b {
	font-weight: 700;
	color: #fff;
}

.gw-hero__winners-count {
	display: block;
	margin-top: 3px;
	font-size: 15px;
	color: var(--gw-muted);
}

.gw-hero__text {
	margin: 0 0 18px;
	max-width: 34em;
	font-size: 14px;
	line-height: 1.55;
	color: var(--gw-muted);
}

.gw-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 20px;
	margin-top: auto;
	padding-top: 10px;
}

.gw-hero__count {
	font-size: 14px;
	color: var(--gw-muted);
}

.gw-hero__msg {
	margin: 12px 0 0;
	font-size: 14px;
	color: #ff8f7a;
}

.gw-hero__all {
	align-self: flex-start;
	margin-top: 18px;
	font-size: 14px;
	color: var(--gw-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.gw-hero__all:hover,
.gw-hero__all:focus {
	color: #fff;
}

/* кнопка участия */
.gw-btn {
	display: inline-block;
	padding: 13px 30px;
	border: 0;
	border-radius: 3px;
	background: var(--gw-teal);
	color: #0d2a25;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.gw-btn:hover {
	background: #46e0bd;
}

.gw-btn:focus-visible {
	box-shadow: 0 0 0 3px rgba(31, 207, 168, 0.45);
}

.gw-btn[disabled] {
	opacity: 0.6;
	cursor: default;
}

.gw-btn--joined {
	background: transparent;
	color: var(--gw-teal);
	box-shadow: inset 0 0 0 2px var(--gw-teal-dark);
	cursor: default;
}

.gw-btn--joined:hover {
	background: transparent;
}

.gw-btn--joined::before {
	content: "✓";
	margin-right: 9px;
}

/* правая часть: таймер или победители */
.gw-hero__side {
	flex: 0 0 326px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 30px 34px 30px 20px;
}

.gw-hero__side-title {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 500;
	color: var(--gw-text);
}

.gw-hero__date {
	margin: 14px 0 0;
	font-size: 13px;
	color: var(--gw-muted);
}

.gw-timer {
	display: flex;
}

.gw-timer__cell {
	flex: 1 1 0;
	padding: 2px 0 4px;
	text-align: center;
	border-left: 1px solid var(--gw-line);
}

.gw-timer__cell:first-child {
	border-left: 0;
}

.gw-timer__cell b {
	display: block;
	font-size: 46px;
	line-height: 1.05;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.01em;
	color: var(--gw-amber);
	text-shadow: 0 0 22px rgba(255, 178, 26, 0.28);
}

.gw-timer__cell span {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: var(--gw-muted);
}

.gw-hero--drawing .gw-timer__cell b {
	color: var(--gw-muted);
	text-shadow: none;
}

/* завершённый розыгрыш */
.gw-hero--finished .gw-hero__kind {
	color: var(--gw-amber);
}

.gw-hero--finished .gw-hero__body {
	padding-bottom: 34px;
}

.gw-hero--finished .gw-hero__all {
	margin-top: auto;
}

/* ---------- Победители ---------- */

.gw-winners {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 196px;
	overflow-y: auto;
}

.gw-winners li {
	margin: 0 0 8px;
}

.gw-winners a {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	color: #fff;
	font-size: 16px;
	font-weight: 500;
}

.gw-winners a:hover {
	color: var(--gw-teal);
}

.gw-winners img {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	margin-right: 11px;
	border-radius: 50%;
	object-fit: cover;
}

.gw-winners span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gw-winners__empty {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--gw-muted);
}

/* ---------- Страница «Розыгрыши» ---------- */

.gw-section-title {
	margin: 8px 0 16px;
	font-size: 20px;
	font-weight: 700;
	color: var(--gw-text);
}

.gw-past {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 12px;
	padding: 20px 26px;
	border-radius: 4px;
	background: var(--gw-panel);
	color: var(--gw-text);
}

.gw-past__main {
	min-width: 0;
}

.gw-past__title {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	overflow-wrap: anywhere;
}

.gw-past__prize {
	margin: 0 0 6px;
	font-size: 15px;
	color: var(--gw-text);
}

.gw-past__meta {
	margin: 0;
	font-size: 13px;
	color: var(--gw-muted);
}

.gw-past__winners {
	flex: 0 0 240px;
}

.gw-past__winners .gw-winners {
	max-height: none;
}

.gw-past__winners .gw-winners a {
	font-size: 15px;
}

.gw-past__winners .gw-winners img {
	width: 28px;
	height: 28px;
}

.gw-empty {
	margin-bottom: 30px;
	padding: 44px 30px;
	border-radius: 4px;
	background: var(--gw-panel);
	text-align: center;
	color: var(--gw-muted);
}

.gw-empty h2 {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 700;
	color: var(--gw-text);
}

.gw-empty p {
	margin: 0;
	font-size: 15px;
}

/* ---------- Узкие экраны ---------- */

@media (max-width: 991px) {
	.gw-hero {
		flex-direction: column;
		min-height: 0;
	}

	.gw-hero::before {
		background: rgba(21, 23, 38, 0.9);
	}

	.gw-hero__body {
		padding: 28px 22px 8px;
	}

	.gw-hero__title {
		font-size: 26px;
	}

	.gw-hero__side {
		flex: 0 0 auto;
		padding: 18px 22px 26px;
	}

	.gw-timer__cell b {
		font-size: 36px;
	}

	.gw-past {
		flex-direction: column;
		gap: 14px;
	}

	.gw-past__winners {
		flex: 0 0 auto;
	}
}
