/* Custom Testimonials — frontend styles. */

.ct-form {
	background: var(--ct-bg, #f1f8e9);
	color: var(--ct-text, #1a1a1a);
	font-family: var(--ct-font, inherit);
	padding: 24px;
	border-radius: var(--ct-radius, 8px);
	max-width: 640px;
	box-sizing: border-box;
}

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

.ct-required-notice {
	margin: 0 0 16px;
	font-size: 13px;
	opacity: .85;
}

.ct-req-star {
	color: #d32f2f;
	font-weight: 700;
}

.ct-field {
	margin-bottom: 16px;
}

.ct-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}

.ct-field input[type="text"],
.ct-field input[type="email"],
.ct-field input[type="url"],
.ct-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--ct-border, #cfd8dc);
	border-radius: var(--ct-radius, 8px);
	background: #fff;
	color: var(--ct-text, #1a1a1a);
	font-family: inherit;
	font-size: 14px;
	transition: border-color .15s, box-shadow .15s;
}

.ct-field input:focus,
.ct-field textarea:focus {
	outline: none;
	border-color: var(--ct-primary, #2e7d32);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ct-primary, #2e7d32) 15%, transparent);
}

.ct-field textarea {
	min-height: 140px;
	resize: vertical;
}

.ct-field input[type="file"] {
	padding: 6px 0;
	font-size: 13px;
}

.ct-hint {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	opacity: .75;
}

/* Star rating — flip row-reverse so :hover cascades left from hovered star. */
.ct-rating {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 2px;
}

.ct-rating input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.ct-rating label {
	cursor: pointer;
	font-size: 28px;
	color: #ddd;
	transition: color .1s;
	line-height: 1;
	margin: 0;
	padding: 0 2px;
}

.ct-rating input:checked ~ label,
.ct-rating label:hover,
.ct-rating label:hover ~ label {
	color: var(--ct-star, #f5a623);
}

.ct-rating input:focus-visible + label {
	outline: 2px dashed var(--ct-primary, #2e7d32);
	outline-offset: 2px;
}

.ct-submit-btn {
	background: var(--ct-primary, #2e7d32);
	color: #fff;
	border: 0;
	padding: 12px 24px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: filter .15s, transform .05s;
}

.ct-submit-btn:hover {
	filter: brightness(1.1);
}

.ct-submit-btn:active {
	transform: translateY(1px);
}

/* Notices */
.ct-notice {
	padding: 12px 16px;
	border-radius: var(--ct-radius, 8px);
	margin-bottom: 16px;
	font-size: 14px;
}

.ct-notice-success {
	background: #e8f5e9;
	color: #1b5e20;
	border: 1px solid #a5d6a7;
}

.ct-notice-error {
	background: #ffebee;
	color: #b71c1c;
	border: 1px solid #ef9a9a;
}

.ct-errors-summary ul {
	margin: 6px 0 0 20px;
	padding: 0;
	list-style: disc;
}

.ct-errors-summary ul li {
	margin: 2px 0;
}

/* Inline per-field errors. */
.ct-field-error {
	margin: 6px 0 0;
	color: #b71c1c;
	font-size: 13px;
	line-height: 1.4;
	font-weight: 600;
}

.ct-field-has-error input[type="text"],
.ct-field-has-error input[type="email"],
.ct-field-has-error input[type="url"],
.ct-field-has-error textarea {
	border-color: #d32f2f !important;
	box-shadow: 0 0 0 3px rgba(211,47,47,0.15);
	background: #fff5f5;
}

.ct-field-has-error > label {
	color: #b71c1c;
}

.ct-field-has-error .ct-rating label {
	/* subtle red outline on the rating label when rating is missing */
	text-shadow: 0 0 0 #d32f2f;
}
.ct-field-has-error.ct-field-rating > label {
	color: #b71c1c;
}

/* ==================== List / Grid ==================== */

.ct-list {
	display: grid;
	gap: 24px;
	margin: 16px 0;
	font-family: var(--ct-font, inherit);
	color: var(--ct-text, #1a1a1a);
}

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

.ct-list-grid {
	grid-template-columns: repeat(var(--ct-columns, 2), minmax(0, 1fr));
}

@media (max-width: 900px) {
	.ct-list-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

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

.ct-item {
	position: relative;
	background: #fff;
	border: 1px solid var(--ct-border, #cfd8dc);
	border-radius: var(--ct-radius, 8px);
	padding: 24px;
	box-sizing: border-box;
	overflow: hidden;
}

.ct-item * { box-sizing: border-box; }

/* Decorative quote mark. */
.ct-item .ct-quote {
	position: absolute;
	top: -6px;
	left: 10px;
	font-size: 80px;
	line-height: 1;
	color: var(--ct-quote-color, var(--ct-primary, #2e7d32));
	opacity: var(--ct-quote-opacity, .35);
	pointer-events: none;
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 700;
}

/* ---- Photo: size + shape via CSS vars from admin settings ---- */
.ct-item-photo {
	width: var(--ct-photo-size, 120px);
	height: var(--ct-photo-size, 120px);
	flex: 0 0 auto;
	border-radius: var(--ct-photo-radius, 0);
	overflow: hidden;
	background: #f5f5f5;
	margin: 0 0 12px 16px;
}

.ct-item-photo img,
.ct-item-photo .ct-photo-img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: var(--ct-photo-fit, cover);
	border-radius: inherit;
}

/* "Natural" shape — do not crop, preserve image aspect ratio. */
.ct-shape-natural .ct-item-photo {
	height: auto;
	aspect-ratio: auto;
}
.ct-shape-natural .ct-item-photo img,
.ct-shape-natural .ct-item-photo .ct-photo-img {
	height: auto !important;
	object-fit: contain;
}

/* ---- Photo position (float within card) ---- */
.ct-photo-right .ct-has-photo .ct-item-photo {
	float: right;
	margin: 0 0 12px 20px;
}

.ct-photo-left .ct-has-photo .ct-item-photo {
	float: left;
	margin: 0 20px 12px 0;
}

.ct-photo-top .ct-has-photo .ct-item-photo {
	float: none;
	margin: 0 auto 16px;
}

/* Clear floats so the card grows to contain the photo. */
.ct-item::after {
	content: "";
	display: block;
	clear: both;
}

.ct-item-body {
	min-width: 0;
}

.ct-item-rating {
	letter-spacing: 2px;
	font-size: 18px;
	margin-bottom: 8px;
}

.ct-stars-full  { color: var(--ct-star, #f5a623); }
.ct-stars-empty { color: #ddd; }

.ct-item-title {
	margin: 4px 0 10px;
	font-size: var(--ct-fs-title, 18px);
	font-weight: 700;
	line-height: 1.3;
}

.ct-item-content {
	font-size: var(--ct-fs-content, 14px);
	line-height: 1.55;
	margin: 0 0 14px;
}

.ct-item-content p {
	margin: 0 0 10px;
}
.ct-item-content p:last-child { margin-bottom: 0; }

/* ---- Meta rows (author / company / website) ---- */
.ct-item-meta {
	margin-top: 10px;
	font-size: var(--ct-fs-meta, 14px);
	line-height: 1.5;
}

.ct-item-author-row,
.ct-item-company-row,
.ct-item-website-row {
	display: block;
	margin-top: 2px;
}

/* Prefixes (Recenzia od: / Spoločnosť: / Web stránka:). */
.ct-prefix-label {
	color: #666;
	margin-right: 4px;
}

.ct-prefix-review {
	font-size: var(--ct-pfx-review-size, 14px);
	font-weight: var(--ct-pfx-review-weight, 400);
	font-style: var(--ct-pfx-review-style, normal);
}

.ct-prefix-company {
	font-size: var(--ct-pfx-company-size, 14px);
	font-weight: var(--ct-pfx-company-weight, 400);
	font-style: var(--ct-pfx-company-style, normal);
}

.ct-prefix-website {
	font-size: var(--ct-pfx-website-size, 14px);
	font-weight: var(--ct-pfx-website-weight, 400);
	font-style: var(--ct-pfx-website-style, normal);
}

.ct-item-author {
	font-size: var(--ct-fs-author, 14px);
	font-weight: var(--ct-author-weight, 700);
	font-style: var(--ct-author-style, normal);
	color: var(--ct-text, #1a1a1a);
}

.ct-item-company {
	font-weight: var(--ct-company-weight, 400);
	font-style: var(--ct-company-style, normal);
	color: var(--ct-text, #1a1a1a);
}

.ct-item-website {
	color: var(--ct-link, #1976d2);
	font-weight: var(--ct-link-weight, 700);
	font-style: var(--ct-link-style, normal);
	text-decoration: var(--ct-link-decoration, none);
	word-break: break-all;
}

.ct-item-website:hover {
	text-decoration: underline;
}

.ct-list-empty {
	padding: 24px;
	text-align: center;
	color: #888;
	background: #fafafa;
	border-radius: var(--ct-radius, 8px);
}

/* On very narrow screens, drop the photo float so layout doesn't break. */
@media (max-width: 480px) {
	.ct-photo-right .ct-has-photo .ct-item-photo,
	.ct-photo-left  .ct-has-photo .ct-item-photo {
		float: none;
		margin: 0 auto 14px;
	}
}

/* Captcha wrapper spacing. */
.ct-field-captcha {
	margin-top: 8px;
}
