/**
 * Treasury Review System — frontend styles.
 * Matches Google's review modal as closely as possible (Roboto, Google colors, spacing).
 */

/* ---------- Shared ---------- */
.tr-landing,
.tr-form-wrap {
	font-family: Roboto, "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
	color: #202124;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	box-sizing: border-box;
}

.tr-landing *,
.tr-form-wrap *,
.tr-landing *::before,
.tr-form-wrap *::before,
.tr-landing *::after,
.tr-form-wrap *::after {
	box-sizing: border-box;
}

/* ---------- Landing page ---------- */
.tr-landing {
	min-height: 60vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 16px;
}

.tr-landing__card {
	width: 100%;
	max-width: 560px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 1px 3px rgba(60,64,67,.12), 0 4px 12px rgba(60,64,67,.08);
	padding: 40px 28px;
	text-align: center;
}

.tr-landing__title {
	font-size: 22px;
	font-weight: 500;
	margin: 0 0 8px;
	color: #202124;
	line-height: 1.3;
}

.tr-landing__subtitle {
	font-size: 15px;
	color: #5f6368;
	margin: 0 0 32px;
}

.tr-landing__choices {
	display: flex;
	gap: 20px;
	justify-content: center;
	flex-wrap: wrap;
}

.tr-choice {
	flex: 1 1 200px;
	max-width: 240px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 24px 16px;
	border: 1px solid #dadce0;
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	background: #fff;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
	cursor: pointer;
}

.tr-choice:hover,
.tr-choice:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(60,64,67,.15);
	outline: none;
}

.tr-choice--happy:hover { border-color: #4caf50; }
.tr-choice--sad:hover   { border-color: #e53935; }

.tr-choice__face {
	width: 88px;
	height: 88px;
	display: block;
}

.tr-choice__face svg {
	width: 100%;
	height: 100%;
	display: block;
}

.tr-choice__label {
	font-size: 17px;
	font-weight: 500;
}

.tr-choice__hint {
	font-size: 13px;
	color: #5f6368;
}

/* ---------- Feedback form ---------- */
.tr-form-wrap {
	display: flex;
	justify-content: center;
	padding: 24px 12px 48px;
}

.tr-form-card {
	width: 100%;
	max-width: 720px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 1px 3px rgba(60,64,67,.12), 0 4px 12px rgba(60,64,67,.08);
	padding: 28px 24px;
}

.tr-form-header {
	margin-bottom: 24px;
}

.tr-form-business {
	font-size: 18px;
	font-weight: 500;
	margin: 0 0 4px;
	color: #202124;
	line-height: 1.4;
}

.tr-form-subtitle {
	font-size: 13px;
	color: #5f6368;
	margin: 0;
}

/* Stars */
.tr-rating-row {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 48px;
	margin-bottom: 4px;
}

.tr-rating-row--overall {
	justify-content: flex-start;
	margin: 12px 0 8px;
}

.tr-rating-label {
	flex: 0 0 110px;
	font-size: 16px;
	color: #202124;
}

.tr-stars {
	display: flex;
	gap: 4px;
}

.tr-stars--small .tr-star svg {
	width: 28px;
	height: 28px;
}

.tr-stars[data-name="overall_rating"] .tr-star svg {
	width: 36px;
	height: 36px;
}

.tr-star {
	background: none;
	border: 0;
	padding: 4px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background .15s ease;
}

.tr-star:hover {
	background: rgba(26,115,232,.06);
}

.tr-star svg {
	display: block;
	width: 32px;
	height: 32px;
}

.tr-star svg path {
	fill: none;
	stroke: #5f6368;
	stroke-width: 1.5;
	transition: fill .15s ease, stroke .15s ease;
}

.tr-star.is-filled svg path,
.tr-stars .tr-star.is-preview svg path {
	fill: #fbbc04;
	stroke: #fbbc04;
}

/* Textarea */
.tr-field {
	margin: 16px 0;
}

.tr-field label {
	display: block;
	font-size: 13px;
	color: #5f6368;
	margin-bottom: 4px;
}

.tr-field textarea,
.tr-field input[type="text"],
.tr-field input[type="email"],
.tr-field input[type="tel"] {
	width: 100%;
	border: 1px solid #dadce0;
	border-radius: 8px;
	padding: 12px 14px;
	font: inherit;
	font-size: 15px;
	color: #202124;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
	outline: none;
}

.tr-field textarea {
	resize: vertical;
	min-height: 100px;
	line-height: 1.5;
}

.tr-field textarea::placeholder,
.tr-field input::placeholder {
	color: #80868b;
}

.tr-field textarea:focus,
.tr-field input:focus {
	border-color: #1a73e8;
	box-shadow: 0 0 0 1px #1a73e8;
}

.tr-field-row {
	display: flex;
	gap: 16px;
}

.tr-field-row > .tr-field {
	flex: 1 1 0;
	margin: 16px 0 0;
}

/* Pill groups (What did you get / spend) */
.tr-pill-group {
	background: #f1f3f4;
	border: 0;
	border-radius: 12px;
	padding: 16px;
	margin: 16px 0 0;
}

.tr-pill-group legend {
	font-size: 15px;
	font-weight: 500;
	color: #202124;
	padding: 0;
	margin-bottom: 12px;
}

.tr-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tr-pill {
	background: #fff;
	border: 1px solid #dadce0;
	border-radius: 999px;
	padding: 8px 16px;
	font: inherit;
	font-size: 14px;
	color: #202124;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.tr-pill:hover {
	background: #e8f0fe;
	border-color: #1a73e8;
}

.tr-pill.is-selected {
	background: #1a73e8;
	border-color: #1a73e8;
	color: #fff;
}

/* Contact block */
.tr-contact {
	border: 0;
	padding: 16px 0 0;
	margin: 8px 0 0;
}

.tr-contact legend {
	font-size: 15px;
	font-weight: 500;
	color: #202124;
	padding: 0;
	margin-bottom: 4px;
}

/* Form actions */
.tr-form-message {
	margin-top: 16px;
	min-height: 1.4em;
	font-size: 14px;
	color: #d93025;
}

.tr-form-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #e8eaed;
}

.tr-btn {
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	border-radius: 4px;
	padding: 9px 18px;
	cursor: pointer;
	border: 0;
	transition: background .15s ease, box-shadow .15s ease;
}

.tr-btn--text {
	background: transparent;
	color: #1a73e8;
}

.tr-btn--text:hover {
	background: rgba(26,115,232,.08);
}

.tr-btn--primary {
	background: #1a73e8;
	color: #fff;
}

.tr-btn--primary:hover:not(:disabled) {
	background: #1765c9;
	box-shadow: 0 1px 2px rgba(60,64,67,.3);
}

.tr-btn--primary:disabled {
	background: #e8eaed;
	color: #9aa0a6;
	cursor: not-allowed;
}

/* Honeypot */
.tr-honeypot {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Success state */
.tr-success {
	text-align: center;
	padding: 24px 8px;
}

.tr-success__icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
}

.tr-success__icon svg {
	width: 100%;
	height: 100%;
}

.tr-success h2 {
	font-size: 22px;
	font-weight: 500;
	margin: 0 0 8px;
	color: #202124;
}

.tr-success p {
	font-size: 15px;
	color: #5f6368;
	margin: 0 auto;
	max-width: 420px;
	line-height: 1.5;
}

/* Mobile */
@media (max-width: 540px) {
	.tr-form-card,
	.tr-landing__card {
		padding: 20px 16px;
		border-radius: 12px;
	}

	.tr-rating-row {
		gap: 8px;
	}

	.tr-rating-label {
		flex-basis: 90px;
		font-size: 15px;
	}

	.tr-stars[data-name="overall_rating"] .tr-star svg {
		width: 32px;
		height: 32px;
	}

	.tr-field-row {
		flex-direction: column;
		gap: 0;
	}

	.tr-choice__face {
		width: 72px;
		height: 72px;
	}
}
