/*
 * Оформление намеренно нейтральное: кнопки берут классы темы (.button),
 * поэтому окно должно только расставить блоки, а не спорить с SportHub.
 */

.tr-qo-open {
	margin-top: 10px;
}

/*
 * Кнопка должна перебивать «В корзину», поэтому берём акцентный цвет темы
 * (терракота) против зелёного основного: контраст даёт заметность без
 * чужеродных цветов. Тема сбрасывает стили button — описываем всё сами.
 */
.tr-qo-slot {
	margin-top: 12px;
}

.tr-qo-block {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	min-height: 52px;
	padding: 0 18px;
	font-family: var( --font, inherit );
	font-size: 16px;
	font-weight: 700;
	color: var( --white, #fff );
	background: var( --accent, #C8522A );
	border: 0;
	border-radius: var( --radius-sm, 6px );
	box-shadow: 0 2px 12px rgba( 200, 82, 42, .28 );
	cursor: pointer;
	transition: background var( --transition, .18s ), box-shadow var( --transition, .18s ), transform var( --transition, .18s );
}

.tr-qo-block:hover {
	background: var( --accent-hover, #A84020 );
	box-shadow: 0 6px 20px rgba( 200, 82, 42, .34 );
	transform: translateY( -1px );
}

.tr-qo-block:focus-visible {
	outline: 2px solid var( --dark, #14241B );
	outline-offset: 2px;
}

.tr-qo-block svg {
	flex: 0 0 auto;
}

/* Подпись снимает вопрос «что будет после нажатия» — без неё кнопка пугает. */
.tr-qo-hint {
	display: block;
	margin-top: 7px;
	font-size: 12.5px;
	line-height: 1.35;
	color: var( --muted, #808880 );
	text-align: center;
}

@media ( prefers-reduced-motion: reduce ) {
	.tr-qo-block {
		transition: none;
	}
	.tr-qo-block:hover {
		transform: none;
	}
}

#tr-qo-fallback[hidden] {
	display: none;
}

.tr-qo-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba( 0, 0, 0, .55 );
	overflow-y: auto;
}

.tr-qo-overlay[hidden] {
	display: none;
}

body.tr-qo-lock {
	overflow: hidden;
}

.tr-qo-dialog {
	position: relative;
	width: 100%;
	max-width: 420px;
	padding: 28px 24px 24px;
	background: #fff;
	border-radius: 6px;
	box-sizing: border-box;
}

.tr-qo-close {
	position: absolute;
	top: 6px;
	right: 10px;
	padding: 4px 8px;
	font-size: 26px;
	line-height: 1;
	color: #666;
	background: none;
	border: 0;
	cursor: pointer;
}

.tr-qo-dialog h3 {
	margin: 0 0 8px;
}

.tr-qo-lead {
	margin: 0 0 14px;
	color: #555;
}

.tr-qo-product {
	margin: 0 0 16px;
	padding: 10px 12px;
	font-weight: 600;
	background: #f4f4f4;
	border-radius: 4px;
}

.tr-qo-field {
	display: block;
	margin-bottom: 14px;
}

.tr-qo-field span {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
	color: #555;
}

.tr-qo-field input {
	width: 100%;
	padding: 11px 12px;
	font-size: 16px; /* меньше 16px — iOS зумит страницу при фокусе */
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
}

/*
 * Согласие не проставлено заранее, поэтому блок должен читаться как часть
 * формы, а не как мелкая сноска: рамка, фон и крупный чекбокс.
 */
.tr-qo-consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-bottom: 16px;
	padding: 12px 14px;
	font-size: 14px;
	line-height: 1.45;
	color: #333;
	background: #f7f7f7;
	border: 1px solid #d5d5d5;
	border-radius: 4px;
	cursor: pointer;
}

.tr-qo-consent input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: #1f6f4a;
	cursor: pointer;
}

.tr-qo-consent a {
	text-decoration: underline;
}

/* Промах по галке — единственная ошибка, которую видно не в тексте, а в блоке. */
.tr-qo-consent.tr-qo-invalid {
	color: #8a1f1f;
	background: #fdecec;
	border-color: #d98a8a;
}

.tr-qo-error {
	margin: 0 0 12px;
	padding: 9px 11px;
	font-size: 14px;
	color: #8a1f1f;
	background: #fdecec;
	border-radius: 4px;
}

.tr-qo-error[hidden] {
	display: none;
}

.tr-qo-submit {
	/* В модалке кнопка идёт сразу за блоком согласия, отступ уже есть у него. */
	margin-top: 0;
}

/* Honeypot: убираем из потока, но не через display:none — часть ботов такие поля пропускает. */
.tr-qo-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tr-qo-done[hidden] {
	display: none;
}
