/* ============================================================
   Studio Visuali — Testimonials  |  testimonials.css  |  v1.0.0
   Front-of-site widget + "add testimonial" modal form.
   Most colours are driven by Elementor controls; values here
   are fallbacks tuned to a teal "guests recommend" section.
   ============================================================ */

.vtst {
	--vtst-dot: #cbd5e1;
	--vtst-dot-active: #334155;
	direction: rtl;
	text-align: center;
	box-sizing: border-box;
}

.vtst *,
.vtst *::before,
.vtst *::after { box-sizing: border-box; }

.vtst-heading {
	margin: 0 0 28px;
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 700;
}

.vtst-empty {
	opacity: 0.8;
	font-size: 16px;
}

/* ── Carousel ─────────────────────────────────────────────── */

.vtst-carousel {
	position: relative;
	max-width: 760px;
	margin: 0 auto;
	padding: 0 44px;
}

.vtst-track {
	position: relative;
	min-height: 180px;
}

/* All slides stacked so opacity can crossfade with no layout jump.
   JS sets .vtst-track min-height to the tallest slide. */
.vtst-carousel .vtst-card {
	position: absolute;
	inset: 0;
	margin: auto;
	height: max-content;
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
	transition: opacity 0.7s ease, transform 0.7s ease;
	will-change: opacity;
}

.vtst-carousel .vtst-card.is-active {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
	z-index: 2;
}

/* No-JS fallback: show the first slide in normal flow. */
.vtst-carousel:not([data-vtst-init]) .vtst-card:first-child {
	position: relative;
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.vtst-carousel .vtst-card { transition: opacity 0.3s linear; transform: none; }
}

/* ── Grid ─────────────────────────────────────────────────── */

.vtst-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	align-items: start;
	text-align: start;
}

@media (max-width: 1024px) {
	.vtst-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.vtst-grid { grid-template-columns: 1fr; }
}

/* ── Card ─────────────────────────────────────────────────── */

.vtst-card {
	background: transparent;
	border-radius: 14px;
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.vtst-grid .vtst-card {
	background: rgba(255, 255, 255, 0.1);
	padding: 24px;
}

.vtst-stars {
	color: #f5a623;
	font-size: 16px;
	letter-spacing: 2px;
	line-height: 1;
}

.vtst-stars-empty { opacity: 0.3; }

.vtst-mark {
	display: block;
	font-size: 46px;
	line-height: 0.4;
	height: 22px;
	opacity: 0.4;
	font-family: Georgia, "Times New Roman", serif;
}

.vtst-quote {
	margin: 0;
	font-size: 17px;
	line-height: 1.8;
	font-style: italic;
	overflow-wrap: break-word;
}

.vtst-card figcaption {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.vtst-name {
	font-weight: 700;
	font-size: 16px;
}

.vtst-sub {
	font-size: 13px;
	opacity: 0.8;
}

/* ── Arrows + dots ────────────────────────────────────────── */

.vtst .vtst-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	cursor: pointer;
	line-height: 1;
	color: currentColor;
	opacity: 0.6;
	padding: 6px;
	transition: opacity 0.15s ease;
	display: flex;
}

.vtst .vtst-arrow svg { width: 26px; height: 26px; display: block; }
.vtst .vtst-arrow:hover { opacity: 1; background: none !important; }
.vtst-arrow--prev { right: 0; }
.vtst-arrow--next { left: 0; }

.vtst-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 20px;
}

.vtst .vtst-dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: none !important;
	box-shadow: none !important;
	border-radius: 50% !important;
	background: var(--vtst-dot) !important;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.vtst .vtst-dot.is-active {
	background: var(--vtst-dot-active) !important;
	transform: scale(1.25);
}

/* ── "Add testimonial" button ─────────────────────────────── */

.vtst-btn-wrap {
	display: flex;
	justify-content: center;
	margin: 28px 0 4px;
}

.vtst .vtst-btn {
	appearance: none;
	-webkit-appearance: none;
	border: none !important;
	box-shadow: none !important;
	cursor: pointer;
	background-color: #16707c;
	color: #ffffff;
	font-size: 15px;
	font-weight: 700;
	padding: 12px 30px;
	border-radius: 8px;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.vtst .vtst-btn:hover { transform: translateY(-1px); opacity: 0.92; }

/* ── Modal ────────────────────────────────────────────────── */

.vtst-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.vtst-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.vtst-modal-box {
	position: relative;
	background: var(--vtst-modal-bg, #ffffff);
	color: var(--vtst-modal-fg, #1f2937);
	width: 100%;
	max-width: 480px;
	max-height: 92vh;
	overflow-y: auto;
	border-radius: var(--vtst-modal-radius, 16px);
	padding: 28px 26px;
	text-align: start;
	direction: rtl;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.vtst-modal .vtst-modal-box .vtst-modal-x {
	position: absolute;
	inset-inline-end: 14px;   /* RTL → left corner */
	top: 8px;
	width: auto;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	font-size: 28px !important;
	font-weight: 400;
	line-height: 1;
	padding: 4px 8px;
	margin: 0;
	cursor: pointer;
	color: var(--vtst-modal-x, #111827) !important;
	opacity: 1;
}

.vtst-modal .vtst-modal-box .vtst-modal-x:hover { opacity: 0.55; }

.vtst-modal-title {
	margin: 0 0 18px;
	font-size: 20px;
	font-weight: 700;
	color: var(--vtst-modal-title, inherit);
}

.vtst-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.vtst-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.vtst-fld {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.vtst-fld-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--vtst-modal-label, #374151);
}

.vtst-fld input[type="text"],
.vtst-fld textarea {
	width: 100%;
	font: inherit;
	font-weight: 400;
	color: var(--vtst-modal-fg, #1f2937);
	border: 1px solid var(--vtst-modal-field-border, #d1d5db);
	border-radius: 8px;
	padding: 10px 12px;
	background: var(--vtst-modal-field-bg, #fff);
}

.vtst-fld textarea { resize: vertical; }

.vtst-fld input:focus,
.vtst-fld textarea:focus {
	outline: none;
	border-color: var(--vtst-modal-accent, #16707c);
}

/* star rating input — DOM order 1..5; in the RTL modal star 1 sits rightmost.
   Fill state (both hover-preview and chosen value) is driven by JS adding
   .is-on to every star up to the active one. */
.vtst-rate {
	display: inline-flex;
	flex-direction: row;
	gap: 4px;
	font-size: 26px;
	line-height: 1;
}

.vtst-rate-star { cursor: pointer; }
.vtst-rate-star input { position: absolute; opacity: 0; width: 0; height: 0; }
.vtst-rate-star span { color: #d1d5db; transition: color 0.1s ease; }
.vtst-rate-star.is-on span { color: #f5a623; }

.vtst-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 12px;
	font-weight: 400;
	color: var(--vtst-modal-label, #6b7280);
	cursor: pointer;
}

.vtst-consent input { margin-top: 3px; flex: 0 0 auto; }

.vtst-modal .vtst-form-submit {
	appearance: none;
	-webkit-appearance: none;
	border: none !important;
	box-shadow: none !important;
	cursor: pointer;
	background-color: var(--vtst-modal-btn-bg, #16707c);
	color: var(--vtst-modal-btn-fg, #fff);
	font-size: 15px;
	font-weight: 700;
	padding: 12px;
	border-radius: 8px;
	transition: opacity 0.15s ease;
}

.vtst-modal .vtst-form-submit:hover { background-color: var(--vtst-modal-btn-bg-hover, #0d5e68); }

.vtst-form-submit:disabled { opacity: 0.6; cursor: default; }

.vtst-form-msg {
	display: none;
	font-size: 13px;
	padding: 10px 12px;
	border-radius: 8px;
}

.vtst-form-msg:not(:empty) { display: block; }
.vtst-form-msg--ok { background: #ecfdf5; color: #047857; }
.vtst-form-msg--err { background: #fef2f2; color: #b91c1c; }

@media (max-width: 480px) {
	.vtst-carousel { padding: 0 30px; }
	.vtst-arrow { font-size: 26px; }
}
