/* Review modals — overlay, dialog, MRP form, promo. Enqueued on review pages
   only. The dialog is a light surface, so text uses explicit dark colours (the
   theme's --tl-text* tokens are light, tuned for the dark site background). */
.tl-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(6, 10, 20, 0.6);
}
.tl-modal.is-open {
	display: flex;
}
.tl-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 32px;
	font-family: var(--tl-font);
	background: #fff;
	border-radius: var(--tl-radius-md, 16px);
	box-shadow: 0 24px 60px rgba(6, 10, 20, 0.28);
}
.tl-modal__close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: #64748b;
	cursor: pointer;
}
.tl-modal__close:hover {
	color: #0f172a;
}
.tl-modal__title {
	margin: 0 8px 16px 0;
	font-size: 22px;
	font-weight: var(--tl-fw-bold, 700);
	color: #0f172a;
}
.tl-modal__text {
	margin: 0 0 12px;
	font-size: 15px;
	line-height: 1.5;
	color: #334155;
}
.tl-modal__text a {
	color: var(--tl-accent, #2c9bf0);
	font-weight: var(--tl-fw-semibold, 600);
	text-decoration: none;
}

/* Login / thanks primary buttons reuse the theme button, but the login button
   sits alone under the copy. */
.tl-modal__login-btn {
	margin-top: 8px;
}

/* ---- MagicReviews rating form inside the form modal ---- */
.tl-modal__form .rating-form {
	margin-top: 4px;
}
.tl-modal__form .rating-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 14px;
	padding: 11px 0;
	border-bottom: 1px solid #eceff3;
}
.tl-modal__form .rating-item .description {
	margin: 0;
	color: #0f172a;
	font-size: 15px;
	font-weight: var(--tl-fw-semibold, 600);
}
/* Push the stars to the right so every row's star column lines up (margin-auto
   ignores the trailing hidden inputs/error span that space-between would space). */
.tl-modal__form .mrp-star-rating {
	display: inline-flex;
	flex-shrink: 0;
	gap: 6px;
	margin-left: auto;
	font-size: 19px;
	line-height: 1;
	color: #f5b301;
	white-space: nowrap;
}
.tl-modal__form .mrp-star-rating i {
	cursor: pointer;
}
/* Full-width so it wraps onto its own line, left-aligned under the label
   (in the flex rating row) or under the textarea (in the comment field). */
.tl-modal__form .mrp-error {
	display: block;
	flex-basis: 100%;
	margin-top: 4px;
	color: #dc2626;
	font-size: 13px;
}
.tl-modal__form .mrp-error:empty {
	display: none;
}
.tl-modal__form .review-field {
	margin-top: 18px;
}
.tl-modal__form .review-field br {
	display: none;
}
.tl-modal__form .textarea-label {
	display: block;
	margin-bottom: 8px;
	color: #0f172a;
	font-size: 15px;
	font-weight: var(--tl-fw-semibold, 600);
}
.tl-modal__form textarea.comments {
	width: 100%;
	box-sizing: border-box;
	min-height: 120px;
	padding: 12px 14px;
	font-family: var(--tl-font);
	font-size: 15px;
	color: #0f172a;
	background: #fff;
	border: 1px solid #d6dce4;
	border-radius: var(--tl-radius-sm, 11px);
	resize: vertical;
}
.tl-modal__form textarea.comments::placeholder {
	font-family: var(--tl-font);
	color: #94a3b8;
}
.tl-modal__form textarea.comments:focus {
	outline: none;
	border-color: var(--tl-accent, #2c9bf0);
	box-shadow: 0 0 0 3px rgba(44, 155, 240, 0.15);
}
.tl-modal__form .wp-block-button {
	margin: 18px 0 0;
}
/* Match the theme primary CTA (.tl-btn--primary): orange gradient + CTA shadow. */
.tl-modal__form .save-rating,
.tl-modal__form .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	padding: 16px 30px;
	font-family: var(--tl-font);
	font-size: 15px;
	font-weight: var(--tl-fw-bold, 700);
	line-height: 1;
	color: var(--tl-text, #fff);
	background: var(--tl-grad-cta, #f78c2f);
	border: 0;
	border-radius: var(--tl-radius-sm, 11px);
	box-shadow: var(--tl-shadow-cta), inset 0 1px 0 rgba(255, 255, 255, 0.2);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tl-modal__form .save-rating:hover,
.tl-modal__form .save-rating:focus-visible,
.tl-modal__form .wp-block-button__link:hover,
.tl-modal__form .wp-block-button__link:focus-visible {
	transform: translateY(-1px);
	box-shadow:
		0 12px 26px -8px rgba(247, 140, 47, 0.7),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ---- Thanks modal promo ---- */
.tl-modal__promo {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 16px;
}
.tl-modal__code {
	padding: 10px 20px;
	font-size: 24px;
	font-weight: var(--tl-fw-extrabold, 800);
	letter-spacing: 0.04em;
	color: var(--tl-accent, #2c9bf0);
	background: rgba(44, 155, 240, 0.1);
	border: 2px dashed rgba(44, 155, 240, 0.5);
	border-radius: var(--tl-radius-sm, 11px);
}

/* Body scroll-lock while any modal is open. */
body.tl-modal-open {
	overflow: hidden;
}
