/* ==========================================================================
   PRIME-3ONA — модуль SORTITION
   Полная замена:
   modules_extra/sortition/templates/prime_site/css/style.css

   Все исходные селекторы модуля сохранены.
   ========================================================================== */

.sortition,
.sortition *,
#prizes,
#prizes *,
#participants,
#participants *,
#winners,
#winners * {
	box-sizing: border-box;
}

.sortition {
	--sortition-bg: #111419;
	--sortition-surface: #181b21;
	--sortition-surface-soft: #1d2128;
	--sortition-border: rgba(255, 255, 255, .075);
	--sortition-text: #c9cdd4;
	--sortition-muted: #8b929c;
	--sortition-red: #ff3b3b;
	--sortition-orange: #ff9800;
	--sortition-orange-soft: #ffbd69;

	position: relative;
	width: 100%;
	padding: 24px;
	overflow: hidden;
	border: 1px solid var(--sortition-border);
	border-radius: 14px;
	background:
		radial-gradient(
			circle at 8% 0,
			rgba(255, 59, 59, .10),
			transparent 32%
		),
		radial-gradient(
			circle at 94% 8%,
			rgba(255, 152, 0, .08),
			transparent 34%
		),
		linear-gradient(180deg, rgba(24, 27, 33, .99), rgba(13, 16, 20, .99));
	color: var(--sortition-text);
	font-family: "Segoe UI", Arial, sans-serif;
	font-size: 13px;
	text-align: center;
	box-shadow:
		0 18px 42px rgba(0, 0, 0, .34),
		inset 0 1px 0 rgba(255, 255, 255, .03);
}

.sortition::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, var(--sortition-red), var(--sortition-orange));
}

.sortition > * {
	position: relative;
	z-index: 1;
}

/* Таймер */
.sortition #ending {
	margin: 0 auto 20px;
	padding: 14px 16px;
	display: inline-flex;
	align-items: stretch;
	justify-content: center;
	gap: 0;
	border: 1px solid rgba(255, 152, 0, .14);
	border-radius: 12px;
	background:
		linear-gradient(
			145deg,
			rgba(255, 59, 59, .045),
			rgba(255, 152, 0, .025)
		),
		#12151a;
	box-shadow:
		0 12px 28px rgba(0, 0, 0, .26),
		inset 0 1px 0 rgba(255, 255, 255, .025);
}

.sortition #ending span {
	min-width: 96px;
	padding: 0 15px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	float: none;
	color: #f1f3f6;
	font-size: 45px;
	font-weight: 950;
	line-height: 1;
	text-shadow:
		0 3px 12px rgba(0, 0, 0, .46),
		0 0 18px rgba(255, 128, 24, .10);
}

.sortition #ending > span:nth-child(2) {
	border-right: 1px solid rgba(255, 255, 255, .075);
	border-left: 1px solid rgba(255, 255, 255, .075);
}

.sortition #ending i {
	margin-top: 7px;
	display: block;
	color: var(--sortition-muted);
	font-family: inherit;
	font-size: 10px;
	font-style: normal;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: .45px;
	text-transform: uppercase;
}

/* Заголовки */
.sortition h1 {
	position: relative;
	margin: 4px 0 18px;
	padding-bottom: 15px;
	color: #f3f4f6;
	font-size: 24px;
	font-weight: 950;
	line-height: 1.3;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: .55px;
}

.sortition h1::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 110px;
	height: 2px;
	transform: translateX(-50%);
	border-radius: 999px;
	background: linear-gradient(90deg, transparent, var(--sortition-red), var(--sortition-orange), transparent);
}

.sortition h2 {
	margin: 15px 0;
	padding: 9px 14px;
	display: inline-block;
	border: 1px solid rgba(255, 152, 0, .13);
	border-radius: 9px;
	background: rgba(255, 152, 0, .035);
	color: #f0f2f4;
	font-size: 18px;
	font-weight: 900;
	line-height: 1.35;
	text-align: center;
}

.sortition h3 {
	color: #eef0f3;
	font-family: inherit;
	font-size: 15px;
	font-weight: 900;
}

.sortition h4,
.sortition h5,
.sortition h6 {
	margin-top: 20px;
	margin-bottom: 12px;
	color: #f1f3f5;
	font-family: inherit;
	font-size: 16px;
	font-weight: 900;
	line-height: 1.4;
}

.sortition h5,
.sortition h6 {
	padding-bottom: 9px;
	border-bottom: 1px solid rgba(255, 255, 255, .075);
}

.sortition a {
	color: var(--sortition-orange-soft);
}

.sortition a:hover,
.sortition a:focus {
	color: #ffd39a;
	text-decoration: none;
}

.sortition p {
	color: #b8bdc5;
	line-height: 1.65;
}

/* Призы */
#prizes {
	text-align: left;
}

#prizes .well {
	margin-bottom: 12px;
	padding: 15px;
	border: 1px solid rgba(255, 255, 255, .07);
	border-radius: 10px;
	background:
		linear-gradient(
			145deg,
			rgba(255, 59, 59, .035),
			rgba(255, 152, 0, .018)
		),
		#171a20;
	color: #c9cdd4;
	box-shadow: none;
	text-align: left;
}

.prize {
	position: relative;
	width: 100%;
	margin-bottom: 9px;
	padding: 11px 12px 11px 38px;
	display: block;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, .065);
	border-radius: 9px;
	background: rgba(255, 255, 255, .018);
	line-height: normal;
	transition:
		border-color .2s ease,
		background .2s ease,
		transform .2s ease;
}

.prize:hover {
	transform: translateY(-1px);
	border-color: rgba(255, 152, 0, .18);
	background: rgba(255, 152, 0, .035);
}

.prize:last-child {
	margin-bottom: 20px;
}

.prize span {
	max-width: 300px;
	margin-left: 0;
	display: inline-block;
	overflow: hidden;
	color: #eef0f3;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
	cursor: pointer;
}

.prize > span:nth-child(2) {
	margin-left: 10px;
}

.prize span small {
	display: block;
	margin-top: 3px;
	color: var(--sortition-muted);
	font-size: 10px;
	font-weight: 600;
	line-height: 1.3;
}

.prize i.fa {
	position: absolute;
	top: 12px;
	left: 12px;
	color: var(--sortition-orange);
	font-size: 17px;
}

.prize p {
	margin: 8px 0 0;
	color: #aeb4bd;
	font-size: 11px;
	line-height: 1.55;
}

/* Модальные окна */
.sortition #prizes .modal {
	text-align: left;
}

.sortition #prizes .modal-content {
	overflow: hidden;
	border: 1px solid rgba(255, 152, 0, .18);
	border-radius: 13px;
	background:
		radial-gradient(
			circle at 50% 0,
			rgba(255, 152, 0, .10),
			transparent 34%
		),
		linear-gradient(180deg, #1b1e24, #101318);
	color: #d2d6dc;
	box-shadow:
		0 24px 70px rgba(0, 0, 0, .52),
		0 0 30px rgba(255, 118, 24, .08);
}

.sortition #prizes .modal-content::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, var(--sortition-red), var(--sortition-orange));
}

.sortition #prizes .modal-header {
	padding: 17px 18px 12px;
	border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.sortition #prizes .modal-body {
	position: relative;
	padding: 17px 18px;
	color: #c6cbd2;
	font-size: 12px;
	line-height: 1.65;
}

.sortition #prizes .modal-body hr {
	margin: 10px 0;
	border-top-color: rgba(255, 255, 255, .07);
}

.sortition h4.modal-title {
	margin: 0;
	padding: 0;
	border-bottom: 0;
	color: #f1f3f5;
	font-size: 17px;
	font-weight: 900;
}

.sortition #prizes .modal-footer {
	border-top: 1px solid rgba(255, 255, 255, .07);
}

.sortition #prizes .close {
	color: #fff;
	opacity: .68;
	text-shadow: none;
}

.sortition #prizes .close:hover {
	color: #ff918d;
	opacity: 1;
}

/* Кнопка участия */
.participate {
	min-width: 190px;
	padding: 12px 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 222, 142, .34);
	border-radius: 10px;
	background: linear-gradient(135deg, #ff3434, #ff9700);
	color: #fff !important;
	font-family: inherit;
	font-size: 13px;
	font-weight: 950;
	line-height: 1.25;
	letter-spacing: .35px;
	text-transform: uppercase;
	text-shadow: none;
	cursor: pointer;
	box-shadow:
		0 11px 25px rgba(255, 75, 35, .22),
		inset 0 1px 0 rgba(255, 255, 255, .18);
	transition:
		transform .2s ease,
		border-color .2s ease,
		box-shadow .2s ease,
		filter .2s ease;
}

.participate:hover,
.participate:focus {
	transform: translateY(-2px);
	border-color: rgba(255, 231, 164, .58);
	background: linear-gradient(135deg, #ff4343, #ffa31a);
	color: #fff !important;
	filter: brightness(1.05);
	box-shadow:
		0 15px 31px rgba(255, 75, 35, .28),
		0 0 18px rgba(255, 148, 17, .10);
}

.participate:active {
	transform: translateY(0);
}

/* Участники */
#participants {
	margin-top: 12px;
	text-align: left;
}

#participants a {
	margin: 0 5px 5px 0;
	padding: 4px 9px 4px 4px;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	border: 1px solid rgba(255, 255, 255, .065);
	border-radius: 8px;
	background: rgba(255, 255, 255, .025);
	color: #d5d9df !important;
	font-size: 10px;
	font-weight: 750;
	transition:
		transform .2s ease,
		border-color .2s ease,
		background .2s ease;
}

#participants a:hover {
	transform: translateY(-1px);
	border-color: rgba(255, 152, 0, .20);
	background: rgba(255, 152, 0, .045);
}

#participants a img {
	width: 30px;
	height: 30px;
	object-fit: cover;
	border: 2px solid rgba(255, 152, 0, .28);
	border-radius: 50%;
	background: #111419;
}

/* Победители */
#winners {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: center;
	gap: 10px;
	text-align: center;
}

#winners a {
	position: relative;
	width: 170px;
	margin: 0;
	padding: 12px;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	overflow: hidden;
	border: 1px solid rgba(255, 152, 0, .18);
	border-radius: 11px;
	background:
		radial-gradient(
			circle at 50% 25%,
			rgba(255, 152, 0, .10),
			transparent 42%
		),
		linear-gradient(
			145deg,
			rgba(255, 59, 59, .045),
			rgba(255, 152, 0, .025)
		),
		#171a20;
	box-shadow:
		0 12px 28px rgba(0, 0, 0, .26),
		inset 0 1px 0 rgba(255, 255, 255, .025);
	transition:
		transform .22s ease,
		border-color .22s ease,
		box-shadow .22s ease;
}

#winners a::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, var(--sortition-red, #ff3b3b), var(--sortition-orange, #ff9800));
}

#winners a:hover {
	transform: translateY(-3px);
	border-color: rgba(255, 152, 0, .30);
	box-shadow:
		0 17px 34px rgba(0, 0, 0, .33),
		0 0 20px rgba(255, 126, 25, .08);
}

#winners a i {
	color: #ffbd69;
	font-size: 18px;
}

#winners a img {
	width: 112px;
	height: 112px;
	margin: 9px 0 10px;
	display: block;
	object-fit: cover;
	border: 3px solid rgba(255, 152, 0, .38);
	border-radius: 50%;
	background: #111419;
	box-shadow:
		0 10px 24px rgba(0, 0, 0, .32),
		0 0 0 4px rgba(255, 152, 0, .05);
}

#winners a span {
	max-width: 145px;
	display: block;
	overflow: hidden;
	color: #f1f3f5;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.5;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Тёмные Bootstrap-элементы внутри модуля */
.sortition .panel,
.sortition .panel-default {
	border-color: rgba(255, 255, 255, .07);
	background: #171a20;
	color: #c9cdd4;
}

.sortition .panel-heading,
.sortition .panel-default > .panel-heading {
	border-color: rgba(255, 255, 255, .07);
	background: #1d2128;
	color: #eef0f3;
}

.sortition .panel-body {
	background: #171a20;
	color: #c9cdd4;
}

.sortition .table {
	color: #c9cdd4;
	background: transparent;
}

.sortition .table > thead > tr > th,
.sortition .table > tbody > tr > th,
.sortition .table > tfoot > tr > th,
.sortition .table > thead > tr > td,
.sortition .table > tbody > tr > td,
.sortition .table > tfoot > tr > td {
	border-top-color: rgba(255, 255, 255, .07);
}

.sortition .form-control {
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 8px;
	background: #101318;
	color: #d6dae0;
	box-shadow: none;
}

.sortition .form-control:focus {
	border-color: rgba(255, 152, 0, .34);
	box-shadow: 0 0 0 3px rgba(255, 152, 0, .06);
}

.sortition .btn-default {
	border-color: rgba(255, 255, 255, .08);
	background: #1d2128;
	color: #d8dce1;
}

.sortition .btn-default:hover {
	border-color: rgba(255, 152, 0, .22);
	background: #232832;
	color: #fff;
}

/* Адаптивность */
@media (max-width: 650px) {
	.sortition {
		padding: 17px 12px;
		border-radius: 12px;
	}

	.sortition #ending {
		width: 100%;
		padding: 12px 7px;
	}

	.sortition #ending span {
		min-width: 0;
		flex: 1;
		padding: 0 8px;
		font-size: 35px;
	}

	.sortition #ending i {
		font-size: 8px;
	}

	.sortition h1 {
		font-size: 20px;
	}

	.sortition h2 {
		font-size: 16px;
	}

	.participate {
		width: 100%;
		min-width: 0;
	}

	#winners a {
		width: calc(50% - 5px);
	}

	#winners a img {
		width: 95px;
		height: 95px;
	}
}

@media (max-width: 420px) {
	.sortition #ending span {
		font-size: 28px;
	}

	.sortition #ending i {
		letter-spacing: 0;
	}

	.prize {
		padding-left: 34px;
	}

	.prize span {
		max-width: 210px;
	}

	#winners {
		display: block;
	}

	#winners a {
		width: 100%;
		margin-bottom: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sortition *,
	#participants *,
	#winners * {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
	}
}
