/**
 * Модуль reviews — шаблон FoxGame (noctis)
 * Тёмная база как у карточек сайта, акцент оранжевый (#ff7a1a / градиент кнопок)
 */

.reviews-module {
	--reviews-bg0: rgba(22, 25, 32, 0.92);
	--reviews-bg-deep: #0b0e11;
	--reviews-border: rgba(255, 255, 255, 0.08);
	--reviews-border-strong: #1e2228;
	--reviews-text: #e8ecf3;
	--reviews-muted: #9aa3b2;
	--reviews-accent: #ff7a1a;
	--reviews-accent-bright: #ff9f47;
	--reviews-accent-deep: #ff5b14;
	--reviews-radius: 15px;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	color: var(--reviews-text);
	padding: 24px 0 48px;
}

.reviews-module *,
.reviews-module *::before,
.reviews-module *::after {
	box-sizing: border-box;
}

.reviews-module__inner {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0 clamp(12px, 2.5vw, 28px);
	min-width: 0;
}

.reviews-module__hero {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px 24px;
	padding: 22px 24px;
	margin-bottom: 20px;
	border-radius: var(--reviews-radius);
	background:
		radial-gradient(90% 120% at 100% 0%, rgba(255, 122, 26, 0.14) 0%, transparent 55%),
		linear-gradient(145deg, rgba(22, 25, 32, 0.95) 0%, rgba(11, 14, 17, 0.92) 100%);
	border: 1px solid var(--reviews-border-strong);
	box-shadow:
		0 16px 48px rgba(0, 0, 0, 0.5),
		inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.reviews-module__hero-icon {
	flex: 0 0 auto;
	width: 58px;
	height: 58px;
	display: grid;
	place-items: center;
	border-radius: 14px;
	background: linear-gradient(145deg, rgba(255, 138, 61, 0.2) 0%, rgba(255, 91, 20, 0.08) 100%);
	border: 1px solid rgba(255, 122, 26, 0.45);
	color: var(--reviews-accent-bright);
	box-shadow: 0 0 24px rgba(255, 91, 20, 0.18);
}

.reviews-module__hero-svg {
	width: 28px;
	height: 28px;
}

.reviews-module__hero-text {
	flex: 1 1 220px;
	min-width: 0;
}

.reviews-module__title {
	margin: 0;
	font-size: clamp(22px, 2.6vw, 28px);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: #fff;
}

.reviews-module__lead {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--reviews-muted);
	max-width: 52ch;
}

.reviews-module__score {
	flex: 0 0 auto;
	min-width: 124px;
	padding: 12px 16px;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 122, 26, 0.22);
	text-align: center;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.reviews-module__score-value {
	font-size: 28px;
	font-weight: 800;
	line-height: 1;
	color: var(--reviews-accent-bright);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.reviews-module__score-value {
		background: linear-gradient(135deg, #ffb478 0%, var(--reviews-accent) 45%, var(--reviews-accent-deep) 100%);
		-webkit-background-clip: text;
		background-clip: text;
		color: transparent;
	}
}

.reviews-module__score-max {
	font-size: 14px;
	font-weight: 700;
	color: var(--reviews-muted);
	margin-left: 2px;
}

.reviews-module__score-label {
	display: block;
	margin-top: 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(226, 232, 240, 0.5);
}

.reviews-module__panel {
	padding: 20px 22px 22px;
	margin-bottom: 18px;
	border-radius: var(--reviews-radius);
	background: var(--reviews-bg0);
	border: 1px solid var(--reviews-border-strong);
	box-shadow:
		0 12px 40px rgba(0, 0, 0, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.reviews-module__list-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px 16px;
	margin-bottom: 14px;
}

.reviews-module__panel-title {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	color: #fff;
	letter-spacing: -0.01em;
}

.reviews-module__badge {
	font-size: 12px;
	font-weight: 600;
	color: var(--reviews-muted);
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.reviews-module__form-grid {
	display: grid;
	grid-template-columns: 1fr minmax(160px, 220px);
	gap: 16px 18px;
	align-items: end;
}

@media (max-width: 720px) {
	.reviews-module__form-grid {
		grid-template-columns: 1fr;
	}
}

.reviews-module__field--grow {
	grid-column: 1 / -1;
}

@media (min-width: 721px) {
	.reviews-module__field--grow {
		grid-column: 1 / 2;
		grid-row: 1 / 2;
	}
	.reviews-module__field:not(.reviews-module__field--grow):not(.reviews-module__field--actions) {
		grid-column: 2 / 3;
		grid-row: 1 / 2;
	}
	.reviews-module__field--actions {
		grid-column: 1 / -1;
		grid-row: 2 / 3;
	}
}

.reviews-module__label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(226, 232, 240, 0.72);
	margin-bottom: 8px;
}

.reviews-module__textarea,
.reviews-module__select {
	width: 100%;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(11, 14, 17, 0.65);
	color: #f1f5f9;
	font-size: 15px;
	line-height: 1.45;
	padding: 12px 14px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reviews-module__textarea {
	resize: vertical;
	min-height: 88px;
	font-family: inherit;
}

.reviews-module__textarea::placeholder {
	color: rgba(148, 163, 184, 0.85);
}

.reviews-module__textarea:focus,
.reviews-module__select:focus {
	border-color: rgba(255, 122, 26, 0.65);
	box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.14);
}

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

.reviews-module__field--actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
}

.reviews-module__submit {
	appearance: none;
	border: none;
	cursor: pointer;
	border-radius: 12px;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: linear-gradient(135deg, #ff8a3d 0%, var(--reviews-accent) 48%, var(--reviews-accent-deep) 100%);
	box-shadow: 0 8px 22px rgba(255, 91, 20, 0.38);
	transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.reviews-module__submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 28px rgba(255, 91, 20, 0.48);
	filter: brightness(1.03);
}

.reviews-module__submit:active {
	transform: translateY(0);
}

.reviews-module__submit:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
	filter: none;
}

.reviews-module__result {
	font-size: 14px;
	font-weight: 600;
	min-height: 1.4em;
}

.reviews-module__result .text-success,
.reviews-module__result--ok {
	color: #86efac;
}

.reviews-module__result .text-danger,
.reviews-module__result--err {
	color: #fca5a5;
}

.reviews-module__table-wrap {
	overflow-x: auto;
	margin: 0 -6px;
	padding: 0 6px;
	-webkit-overflow-scrolling: touch;
}

.reviews-module__table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 14px;
}

.reviews-module__th {
	text-align: left;
	padding: 10px 12px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(226, 232, 240, 0.5);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	white-space: nowrap;
}

.reviews-module__th--avatar {
	width: 64px;
}

.reviews-module__th--narrow {
	width: 1%;
}

.reviews-module__row {
	transition: background 0.15s ease;
}

.reviews-module__row:hover {
	background: rgba(255, 122, 26, 0.05);
}

.reviews-module__row--empty:hover {
	background: transparent;
}

.reviews-module__td {
	padding: 14px 12px;
	vertical-align: middle;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	color: #e2e8f0;
}

.reviews-module__td--empty {
	text-align: center;
	padding: 28px 16px;
	color: var(--reviews-muted);
	font-size: 15px;
}

.reviews-module__td--avatar {
	width: 64px;
}

.reviews-module__avatar-link {
	display: inline-flex;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid rgba(255, 122, 26, 0.25);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.reviews-module__avatar {
	display: block;
	width: 44px;
	height: 44px;
	object-fit: cover;
}

.reviews-module__author {
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.reviews-module__author:hover {
	color: var(--reviews-accent-bright);
	border-bottom-color: rgba(255, 138, 61, 0.55);
}

.reviews-module__td--text {
	color: rgba(226, 232, 240, 0.92);
	line-height: 1.55;
	max-width: none;
	min-width: 0;
}

.reviews-module__td--rating {
	text-align: center;
	white-space: nowrap;
}

.reviews-module__stars {
	font-size: 15px;
	letter-spacing: 0.04em;
}

.reviews-module__td--meta {
	color: var(--reviews-muted);
	font-size: 13px;
	white-space: nowrap;
}

.reviews-module__time {
	color: inherit;
}

.reviews-module__delete {
	margin-left: 8px;
	appearance: none;
	border: 1px solid rgba(248, 113, 113, 0.45);
	background: rgba(248, 113, 113, 0.12);
	color: #fecaca;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 8px;
	cursor: pointer;
	vertical-align: middle;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.reviews-module__delete:hover {
	background: rgba(248, 113, 113, 0.22);
	border-color: rgba(248, 113, 113, 0.65);
}

/* Светлая тема */
body.lightStyle .reviews-module,
body:not(.darkStyle) .reviews-module {
	--reviews-bg0: rgba(255, 255, 255, 0.88);
	--reviews-border-strong: rgba(15, 23, 42, 0.1);
	--reviews-text: #0f172a;
	--reviews-muted: #64748b;
}

body.lightStyle .reviews-module__hero,
body:not(.darkStyle) .reviews-module__hero {
	background: linear-gradient(155deg, #ffffff 0%, #fff4ed 55%, #f1f5f9 100%);
	border-color: rgba(15, 23, 42, 0.1);
	box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

body.lightStyle .reviews-module__title,
body:not(.darkStyle) .reviews-module__title {
	color: #0f172a;
}

body.lightStyle .reviews-module__hero-icon,
body:not(.darkStyle) .reviews-module__hero-icon {
	background: linear-gradient(145deg, rgba(255, 138, 61, 0.22) 0%, rgba(255, 91, 20, 0.1) 100%);
	border-color: rgba(255, 122, 26, 0.35);
	color: #c2410c;
	box-shadow: none;
}

body.lightStyle .reviews-module__score,
body:not(.darkStyle) .reviews-module__score {
	background: rgba(15, 23, 42, 0.04);
	border-color: rgba(255, 122, 26, 0.2);
}

body.lightStyle .reviews-module__textarea,
body.lightStyle .reviews-module__select,
body:not(.darkStyle) .reviews-module__textarea,
body:not(.darkStyle) .reviews-module__select {
	background: #fff;
	border-color: rgba(15, 23, 42, 0.12);
	color: #0f172a;
}

body.lightStyle .reviews-module__author,
body:not(.darkStyle) .reviews-module__author {
	color: #0f172a;
}

body.lightStyle .reviews-module__th,
body:not(.darkStyle) .reviews-module__th {
	color: #64748b;
	border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.lightStyle .reviews-module__td,
body:not(.darkStyle) .reviews-module__td {
	color: #334155;
	border-bottom-color: rgba(15, 23, 42, 0.06);
}

body.lightStyle .reviews-module__row:hover,
body:not(.darkStyle) .reviews-module__row:hover {
	background: rgba(255, 122, 26, 0.06);
}
