/**
 * Tool Rate & Review — frontend widget.
 */

.sn-tr-widget {
	margin-top: 0.9rem;
}

.sn-tr-widget--after-actions {
	max-width: 100%;
}

.sn-tr-widget--below-tool {
	margin-top: 1rem;
}

.sn-tr-widget--above-footer {
	max-width: 960px;
	margin: 1.25rem auto;
	padding: 0 1rem;
}

.sn-tr-widget__inner {
	padding: 0.7rem 0.9rem 0.85rem;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafb;
	text-align: center;
}

.sn-tr-widget__title {
	margin: 0 0 0.4rem;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	color: #1f2937;
}

.sn-tr-widget__stars {
	display: inline-flex;
	gap: 0.15rem;
	margin-bottom: 0.2rem;
}

.sn-tr-widget__star {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.7rem;
	height: 1.7rem;
	padding: 0;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #f59e0b;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	transition: color 0.15s ease, transform 0.15s ease;
}

.sn-tr-widget__star:hover,
.sn-tr-widget__star:focus-visible {
	color: #f59e0b;
	transform: scale(1.08);
	outline: none;
}

.sn-tr-widget__star.is-active {
	color: #f59e0b;
}

.sn-tr-widget__followup {
	margin-top: 0.55rem;
	text-align: left;
}

.sn-tr-widget__label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.79rem;
	font-weight: 600;
	color: #6b7280;
}

.sn-tr-widget__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.sn-tr-widget__tag {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.22rem 0.5rem;
	border: 1px solid var(--sn-border, #e2e8f0);
	border-radius: 999px;
	background: #fff;
	font-size: 0.74rem;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.sn-tr-widget__tag:has(input:checked) {
	border-color: #2563eb;
	background: #eff6ff;
}

.sn-tr-widget__tag input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.sn-tr-widget__textarea {
	width: 100%;
	padding: 0.45rem 0.55rem;
	border: 1px solid var(--sn-border, #e2e8f0);
	border-radius: 8px;
	font-family: inherit;
	font-size: 0.8rem;
	resize: vertical;
}

.sn-tr-widget__textarea:focus {
	outline: 2px solid #2563eb;
	outline-offset: 1px;
}

.sn-tr-widget__actions {
	margin-top: 0.55rem;
}

.sn-tr-widget__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sn-tr-widget__message {
	margin: 0.45rem 0 0;
	font-size: 0.78rem;
}

.sn-tr-widget__message.is-success {
	color: #059669;
}

.sn-tr-widget__message.is-error {
	color: #dc2626;
}

.sn-tr-widget.is-done .sn-tr-widget__inner {
	background: #f0fdf4;
	border-color: #bbf7d0;
}

@media (max-width: 480px) {
	.sn-tr-widget__star {
		width: 1.5rem;
		height: 1.5rem;
		font-size: 1.1rem;
	}

	.sn-tr-widget--after-actions {
		margin-top: 0.75rem;
	}
}
