/**
 * 24Rent Testimonials — front-end styles.
 * Design tokens captured from the live 24rent.fi grid slider so the new
 * shortcodes match the current look. Fonts are inherited from the theme
 * (Nunito on this site) — no web font is loaded by the plugin.
 */

.trt-slider-wrap,
.trt-archive {
	--trt-teal:        #0bb395;
	--trt-card-radius: 5px;
	--trt-card-shadow: 0 2px 18px rgba(0, 0, 0, 0.3);
	--trt-text:        #343a40;
	--trt-name:        #000;
	--trt-meta:        #000;
	--trt-star-empty:  #878787;
	--trt-star-fill:   #f79400;
	--trt-dot-active:  #fbb022;
}

/* ---------- Card (shared by slider + archive) ---------- */
.trt-card {
	background: #fff;
	border-radius: var(--trt-card-radius);
	box-shadow: var(--trt-card-shadow);
	padding: 25px;
	color: var(--trt-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 21px;
	text-align: center;
	box-sizing: border-box;
	width: 100%;      /* fill the slide / grid cell so all cards are equal width */
	min-width: 0;     /* allow flex item to shrink and wrap long words */
	height: 100%;     /* equal height within a row */
	display: flex;
	flex-direction: column;
}

.trt-card__image {
	margin: 0 0 14px;
}
.trt-card__img {
	width: 84px;
	height: 84px;
	border-radius: 50%;
	object-fit: cover;
	display: inline-block;
}

.trt-card__text {
	margin: 0 0 14px;
	overflow-wrap: break-word;
	word-break: break-word;
}
.trt-card__text p {
	margin: 0 0 10px;
}
.trt-card__text p:last-child {
	margin-bottom: 0;
}
.trt-card__more {
	color: var(--trt-star-fill);
	font-style: italic;
	font-weight: 600;
	text-decoration: underline;
	white-space: nowrap;
}
.trt-card__more:hover {
	text-decoration: none;
}

.trt-card__meta {
	margin-top: auto;
}
.trt-card__name {
	color: var(--trt-name);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
	margin: 0;
}
.trt-card__company {
	color: var(--trt-meta);
	font-size: 12px;
	font-weight: 700;
	margin-top: 2px;
}
.trt-card__company a {
	color: inherit;
	text-decoration: none;
}
.trt-card__company a:hover {
	text-decoration: underline;
}

/* ---------- Star rating (two stacked rows, gold clipped by width) ---------- */
.trt-stars {
	position: relative;
	display: inline-block;
	align-self: center;   /* don't stretch as a flex child — width must equal the 5 glyphs, so partial fills are accurate */
	margin-top: 12px;
	font-size: 15px;
	line-height: 1;
	letter-spacing: 1px;
	white-space: nowrap;
}
.trt-stars__base { color: var(--trt-star-empty); }
.trt-stars__fill {
	color: var(--trt-star-fill);
	position: absolute;
	left: 0;
	top: 0;
	overflow: hidden;
}

/* ---------- Slider ---------- */
.trt-slider-wrap {
	position: relative;
}
.trt-slider {
	padding: 6px 4px 4px; /* room for card shadow */
}
.trt-slider .swiper-wrapper {
	align-items: stretch;
}
.trt-slider .swiper-slide {
	height: auto;
	display: flex;
}

/* dots */
.trt-slider .swiper-pagination {
	position: static;
	margin-top: 22px;
}
.trt-slider .swiper-pagination-bullet {
	width: 12px;
	height: 12px;
	background: rgba(255, 255, 255, 0.55);
	opacity: 1;
	margin: 0 5px;
	transition: background 0.2s;
}
.trt-slider .swiper-pagination-bullet-active {
	background: var(--trt-dot-active);
}

/* arrows (only if enabled) */
.trt-slider .swiper-button-next,
.trt-slider .swiper-button-prev {
	color: #fff;
}
.trt-slider .swiper-button-next:after,
.trt-slider .swiper-button-prev:after {
	font-size: 26px;
}

/* read-more button */
.trt-more {
	text-align: center;
	margin-top: 26px;
}
.trt-more__btn {
	display: inline-block;
	background: #2b2b2b;
	color: #fff;
	border-radius: 40px;
	padding: 12px 28px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.2s;
}
.trt-more__btn:hover,
.trt-more__btn:focus {
	background: #000;
	color: #fff;
}

/* ---------- Archive grid ---------- */
.trt-grid {
	display: grid;
	grid-template-columns: repeat(var(--trt-cols, 3), 1fr);
	gap: 24px;
	align-items: stretch;
	transition: opacity 0.2s ease;
}
.trt-grid.is-loading {
	opacity: 0.4;
}
@media (max-width: 1024px) {
	.trt-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.trt-grid { grid-template-columns: 1fr; }
}

/* filter bar */
.trt-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin: 0 0 26px;
}
.trt-filter {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 40px;
	padding: 8px 18px;
	font: 700 13px/1 inherit;
	color: var(--trt-text);
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.trt-filter:hover {
	border-color: var(--trt-teal);
	color: var(--trt-teal);
}
.trt-filter.is-active {
	background: var(--trt-teal);
	border-color: var(--trt-teal);
	color: #fff;
}

/* load more */
.trt-loadmore-wrap {
	text-align: center;
	margin-top: 34px;
}
.trt-loadmore-wrap[hidden] {
	display: none;
}
.trt-loadmore {
	background: var(--trt-teal);
	color: #fff;
	border: 0;
	border-radius: 40px;
	padding: 13px 32px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: filter 0.2s;
}
.trt-loadmore:hover { filter: brightness(0.92); }
.trt-loadmore[disabled] { opacity: 0.6; cursor: default; }

.trt-loading {
	display: inline-flex;
	gap: 5px;
	margin-left: 10px;
	vertical-align: middle;
}
.trt-loading[hidden] { display: none; }
.trt-loading span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--trt-teal);
	animation: trt-bounce 1s infinite ease-in-out both;
}
.trt-loading span:nth-child(2) { animation-delay: 0.15s; }
.trt-loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes trt-bounce {
	0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
	40%           { transform: scale(1);   opacity: 1;   }
}
