/**
 * Zinn Testimonials — Frontend Styles
 * v1.0.5 — filename-versioned for Cloudflare (no query strings)
 *
 * Colours: #c8962e (gold), #1a1a2e (dark navy), #333/#555/#888 (text)
 */

/* Box-sizing + overflow protection */
.zt-testimonials,
.zt-testimonials *,
.zt-form-wrapper,
.zt-form-wrapper *,
.zt-login-prompt,
.zt-login-prompt * {
	box-sizing: border-box;
}

.zt-card,
.zt-form,
.zt-login-prompt {
	overflow-wrap: break-word;
	word-break: break-word;
}

/* Screen reader only — accessible but visually hidden */
.zt-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	.zt-card {
		animation: none !important;
		transition: none !important;
	}
	.zt-card:hover {
		transform: none;
	}
	.zt-cta-btn {
		transition: none !important;
	}
	.zt-cta-btn:hover {
		transform: none;
	}
}

/* Focus-visible outlines for keyboard navigation */
.zt-star-select:focus-visible,
.zt-store-link:focus-visible,
.zt-zinn-link:focus-visible,
.zt-btn:focus-visible,
.zt-submit-btn:focus-visible,
.zt-role-option:focus-within {
	outline: 2px solid #c8962e;
	outline-offset: 2px;
}

.zt-profile-link:focus-visible {
	outline: 2px solid #0d9488;
	outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════
 *  GRID + LIST LAYOUTS
 * ═══════════════════════════════════════════════════════════════════ */

.zt-testimonials {
	display: grid;
	gap: 24px;
	margin: 30px 0;
}

.zt-layout-grid.zt-cols-3 { grid-template-columns: repeat(3, 1fr); }
.zt-layout-grid.zt-cols-2 { grid-template-columns: repeat(2, 1fr); }
.zt-layout-grid.zt-cols-1 { grid-template-columns: 1fr; }

.zt-layout-list { grid-template-columns: 1fr; }

@media (max-width: 960px) {
	.zt-layout-grid.zt-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.zt-layout-grid.zt-cols-3,
	.zt-layout-grid.zt-cols-2 { grid-template-columns: 1fr; }

	.zt-testimonials { gap: 16px; margin: 20px 0; }
	.zt-card { padding: 20px; }

	/* List layout goes vertical on mobile */
	.zt-layout-list .zt-card {
		flex-direction: column;
		gap: 12px;
	}
}

/* Small phone screens (375px and below — iPhone SE, Galaxy S etc) */
@media (max-width: 400px) {
	.zt-testimonials { gap: 12px; margin: 16px 0; }
	.zt-card { padding: 16px; min-height: auto; }
	.zt-card-image img { width: 60px; height: 60px; }
	.zt-stars { font-size: 16px; }
	.zt-text { font-size: 14px; line-height: 1.6; }
	.zt-name { font-size: 13px; }
	.zt-badge { font-size: 10px; padding: 2px 8px; }
	.zt-date { font-size: 11px; }
	.zt-store-link { font-size: 12px; }
	.zt-profile-link { font-size: 12px; }
	.zt-zinn-link { font-size: 10px; padding: 2px 8px; }
	.zt-buyer-meta { font-size: 11px; }

	/* Form page on small phones */
	.zt-form-wrapper { margin: 16px 8px; }
	.zt-form { padding: 20px 16px; }
	.zt-role-options { flex-direction: column; gap: 8px; }
	.zt-role-option { padding: 8px 14px; }
	.zt-star-select { font-size: 24px; }
	.zt-submit-btn { padding: 12px 20px; font-size: 15px; }
	.zt-login-prompt { padding: 24px 16px; margin: 20px 8px; }
	.zt-login-prompt h3 { font-size: 18px; }
	.zt-login-prompt p { font-size: 14px; }
	.zt-login-buttons { flex-direction: column; gap: 8px; }
	.zt-btn { text-align: center; padding: 12px 24px; font-size: 14px; }
}

/* ═══════════════════════════════════════════════════════════════════
 *  CARD
 * ═══════════════════════════════════════════════════════════════════ */

.zt-card {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.3s ease, transform 0.3s ease;
	animation: zt-fade-in 0.5s ease both;
	min-height: 200px;
}

.zt-card:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.zt-layout-list .zt-card {
	flex-direction: row;
	align-items: flex-start;
	gap: 20px;
	min-height: auto;
}

@keyframes zt-fade-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════
 *  IMAGE
 * ═══════════════════════════════════════════════════════════════════ */

.zt-card-image {
	flex-shrink: 0;
}

.zt-card-image img {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid #f0e6d0;
}

.zt-layout-grid .zt-card-image {
	text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════
 *  STARS
 * ═══════════════════════════════════════════════════════════════════ */

.zt-stars {
	display: flex;
	gap: 2px;
	font-size: 18px;
	line-height: 1;
}

.zt-star {
	color: #ddd;
}

.zt-star-filled {
	color: #c8962e;
}

/* ═══════════════════════════════════════════════════════════════════
 *  TEXT + META
 *
 *  The testimonial body is now routed through the shared UGC translate
 *  component (CLAUDE.md §10b): on the live path .zt-text is a wrapper <div>
 *  containing .zhc-ugc / .zhc-ugc-body (translated body) plus the optional
 *  "translated for you" notice + Show-original toggle. The italic + smart-quote
 *  styling is applied to .zhc-ugc-body ONLY so the notice/toggle stay upright
 *  and unquoted. .zt-text--plain is the no-core fallback (original blockquote).
 * ═══════════════════════════════════════════════════════════════════ */

.zt-text {
	font-size: 15px;
	line-height: 1.7;
	color: #444;
	margin: 0;
	padding: 0;
	border: none;
	flex: 1;
}

/* Plain fallback (shared UGC component absent) keeps the original look. */
.zt-text--plain {
	quotes: "\201C" "\201D";
	font-style: italic;
}
.zt-text--plain::before { content: open-quote; }
.zt-text--plain::after  { content: close-quote; }

/* Translated UGC body — italic + smart quotes on the body only. */
.zt-text .zhc-ugc-body {
	quotes: "\201C" "\201D";
	font-style: italic;
}
.zt-text .zhc-ugc-body::before { content: open-quote; }
.zt-text .zhc-ugc-body::after  { content: close-quote; }
.zt-text .zhc-ugc-body p { margin: 0 0 8px; }
.zt-text .zhc-ugc-body p:last-child { margin-bottom: 0; }

.zt-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 4px;
}

.zt-name {
	font-weight: 700;
	font-size: 14px;
	color: #1a1a2e;
}

.zt-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.3px;
	color: #fff;
}

.zt-badge-vendor     { background: #1565c0; }
.zt-badge-buyer      { background: #2e7d32; }
.zt-badge-ambassador { background: #c8962e; }

.zt-date {
	display: block;
	font-size: 12px;
	color: #999;
	margin-top: 4px;
}

.zt-buyer-meta {
	font-size: 12px;
	color: #888;
	font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════
 *  VENDOR EXTRAS (store link + zinns)
 * ═══════════════════════════════════════════════════════════════════ */

.zt-vendor-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 6px;
}

.zt-vendor-badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.zt-vendor-extras {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.zt-store-link {
	display: inline-block;
	color: #c8962e !important;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none !important;
	padding: 6px 14px;
	background: #fdf8ee;
	border: 1px solid #e8d5a8;
	border-radius: 6px;
	transition: background 0.2s, border-color 0.2s;
}

.zt-store-link:hover {
	background: #f9efd8;
	border-color: #c8962e;
	text-decoration: none !important;
	color: #8b6914 !important;
}

.zt-profile-link {
	display: inline-block;
	color: #0f766e !important;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none !important;
	padding: 6px 14px;
	background: #f0fdfa;
	border: 1px solid #99f6e4;
	border-radius: 6px;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.zt-profile-link:hover {
	background: #ccfbf1;
	border-color: #0d9488;
	text-decoration: none !important;
	color: #115e59 !important;
}

.zt-zinns {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.zt-zinn-link {
	display: inline-block;
	padding: 3px 10px;
	background: #f5f0e6;
	color: #8b6914;
	font-size: 11px;
	font-weight: 600;
	border-radius: 6px;
	text-decoration: none;
	white-space: nowrap;
}

.zt-zinn-link:hover {
	background: #ece3d0;
}

/* ═══════════════════════════════════════════════════════════════════
 *  SECTIONS + LOAD MORE
 * ═══════════════════════════════════════════════════════════════════ */

.zt-section {
	margin-bottom: 48px;
}

.zt-section:last-of-type {
	margin-bottom: 0;
}

.zt-section-header {
	margin-bottom: 24px;
	text-align: center;
}

.zt-section-heading {
	font-family: inherit;
	font-size: clamp(20px, 3vw, 26px);
	font-weight: 800;
	color: #1a1a2e;
	margin: 0 0 8px;
	line-height: 1.3;
}

.zt-section-intro {
	font-size: 14px;
	line-height: 1.6;
	color: #777;
	margin: 0 auto;
	max-width: 640px;
	padding-bottom: 16px;
	border-bottom: 2px solid #f0e6d0;
}

.zt-loadmore-wrap {
	text-align: center;
	margin-top: 28px;
}

.zt-loadmore-btn {
	display: inline-block;
	padding: 14px 40px;
	background: #c8962e !important;
	color: #fff !important;
	font-size: 15px;
	font-weight: 700;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
	min-width: 220px;
}

.zt-loadmore-btn:hover {
	background: #b07d22 !important;
	transform: translateY(-1px);
}

.zt-loadmore-btn:disabled {
	cursor: not-allowed;
	opacity: 0.7;
}

.zt-loadmore-btn.zt-loadmore-done {
	background: #2e7d32 !important;
	color: #fff !important;
	opacity: 1;
	cursor: default;
}

.zt-loadmore-btn:focus-visible {
	outline: 2px solid #c8962e;
	outline-offset: 2px;
}

.zt-loadmore-counter {
	font-weight: 400;
	font-size: 13px;
	opacity: 0.85;
}

@media (max-width: 600px) {
	.zt-section { margin-bottom: 36px; }
	.zt-section-heading { font-size: 18px; }
	.zt-section-intro { font-size: 13px; }
	.zt-loadmore-btn { width: 100%; padding: 12px 20px; }
}

@media (max-width: 400px) {
	.zt-section { margin-bottom: 28px; }
	.zt-section-heading { font-size: 16px; }
	.zt-section-intro { font-size: 12px; }
	.zt-loadmore-btn { font-size: 14px; }
}

/* ═══════════════════════════════════════════════════════════════════
 *  EMPTY STATE
 * ═══════════════════════════════════════════════════════════════════ */

.zt-empty {
	text-align: center;
	padding: 40px 20px;
	color: #999;
	font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════════
 *  CTA — Leave Your Own Testimonial
 * ═══════════════════════════════════════════════════════════════════ */

.zt-cta {
	margin: 40px 0 0;
	padding: 36px 32px;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	border-radius: 14px;
	border: 1px solid rgba(200, 150, 46, 0.2);
}

.zt-cta-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: 860px;
	margin: 0 auto;
}

.zt-cta-text {
	flex: 1;
	min-width: 0;
}

.zt-cta-title {
	font-family: inherit;
	font-size: 20px;
	font-weight: 800;
	color: #fff !important;
	margin: 0 0 8px;
	line-height: 1.3;
}

.zt-cta-sub {
	font-size: 14px;
	line-height: 1.6;
	color: #a0a0b8;
	margin: 0;
}

.zt-cta-btn {
	display: inline-block;
	flex-shrink: 0;
	padding: 14px 32px;
	background: #c8962e !important;
	color: #fff !important;
	font-size: 15px;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background 0.2s ease, transform 0.2s ease;
}

.zt-cta-btn:hover {
	background: #b07d22 !important;
	color: #fff !important;
	transform: translateY(-1px);
}

.zt-cta-btn:focus-visible {
	outline: 2px solid #c8962e;
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.zt-cta { padding: 28px 20px; margin-top: 28px; }
	.zt-cta-inner { flex-direction: column; text-align: center; }
	.zt-cta-title { font-size: 18px; }
	.zt-cta-btn { width: 100%; text-align: center; }
}

@media (max-width: 400px) {
	.zt-cta { padding: 22px 16px; }
	.zt-cta-title { font-size: 16px; }
	.zt-cta-sub { font-size: 13px; }
	.zt-cta-btn { padding: 12px 24px; font-size: 14px; }
}

/* ═══════════════════════════════════════════════════════════════════
 *  FORM — LOGIN PROMPT
 * ═══════════════════════════════════════════════════════════════════ */

.zt-login-prompt {
	max-width: 500px;
	margin: 40px auto;
	text-align: center;
	padding: 40px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.zt-login-prompt h3 {
	color: #1a1a2e;
	margin: 0 0 12px;
	font-size: 22px;
}

.zt-login-prompt p {
	color: #666;
	font-size: 15px;
	line-height: 1.6;
	margin: 0 0 24px;
}

.zt-login-buttons {
	display: flex;
	justify-content: center;
	gap: 12px;
}

.zt-btn {
	display: inline-block;
	padding: 12px 32px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.2s ease;
}

.zt-btn-primary {
	background: #c8962e !important;
	color: #fff !important;
}

.zt-btn-primary:hover {
	background: #b07d22 !important;
	color: #fff !important;
}

.zt-btn-secondary {
	background: #1a1a2e !important;
	color: #fff !important;
}

.zt-btn-secondary:hover {
	background: #2a2a4e !important;
	color: #fff !important;
}

/* ═══════════════════════════════════════════════════════════════════
 *  FORM — SUBMISSION
 * ═══════════════════════════════════════════════════════════════════ */

.zt-form-wrapper {
	max-width: 600px;
	margin: 30px auto;
}

.zt-form {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	padding: 32px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.zt-field {
	margin-bottom: 24px;
}

.zt-label {
	display: block;
	font-weight: 700;
	font-size: 14px;
	color: #333;
	margin-bottom: 6px;
}

.zt-required {
	color: #c62828;
}

.zt-static-value {
	font-size: 15px;
	color: #555;
	margin: 0;
	padding: 10px 14px;
	background: #f8f9fa;
	border-radius: 6px;
}

.zt-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #ccc;
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	line-height: 1.6;
	resize: vertical;
	transition: border-color 0.2s;
}

.zt-form textarea:focus {
	border-color: #c8962e;
	outline: none;
	box-shadow: 0 0 0 3px rgba(200, 150, 46, 0.15);
}

.zt-word-count {
	font-size: 12px;
	color: #999;
	margin: 4px 0 0;
	text-align: right;
}

.zt-field-help {
	font-size: 13px;
	color: #888;
	margin: 0 0 8px;
}

.zt-field-error {
	font-size: 13px;
	color: #c62828;
	margin: 4px 0 0;
}

.zt-form input[type="file"] {
	font-size: 14px;
}

.zt-image-preview {
	margin-top: 10px;
}

.zt-image-preview img {
	border-radius: 8px;
	object-fit: cover;
	border: 2px solid #e8e8e8;
}

/* Star input */
.zt-star-input {
	display: flex;
	gap: 4px;
}

.zt-star-select {
	font-size: 28px;
	color: #ddd;
	cursor: pointer;
	transition: color 0.15s;
	user-select: none;
	min-width: 44px;
	min-height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.zt-star-select.zt-star-active,
.zt-star-select.zt-star-hover {
	color: #c8962e;
}

/* Role options */
.zt-role-options {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.zt-role-option {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	background: #f8f9fa;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.2s;
}

.zt-role-option:has(input:checked) {
	border-color: #c8962e;
	background: #fdf8ee;
}

.zt-role-label {
	font-weight: 600;
	font-size: 14px;
	color: #333;
}

/* Submit button */
.zt-submit-btn {
	display: inline-block;
	background: #c8962e !important;
	color: #fff !important;
	border: none;
	padding: 14px 36px;
	font-size: 16px;
	font-weight: 700;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s;
	width: 100%;
}

.zt-submit-btn:hover {
	background: #b07d22 !important;
}

.zt-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Messages */
.zt-form-message {
	padding: 16px 20px;
	border-radius: 8px;
	margin-bottom: 16px;
}

.zt-form-message p {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
}

.zt-form-success {
	background: #e8f5e9;
	border: 1px solid #a5d6a7;
	color: #2e7d32;
}

.zt-form-info {
	background: #e3f2fd;
	border: 1px solid #90caf9;
	color: #1565c0;
}
