/**
 * TICSE Testimonials Pro – Frontend Styles
 * Version: 1.0.0
 */

/* =========================================================
   CSS Custom Properties (overrideable via Elementor)
   ========================================================= */
.ticse-tp-wrapper {
	--ticse-card-bg:          #ffffff;
	--ticse-card-radius:      16px;
	--ticse-card-shadow:      0 8px 32px rgba(0, 0, 0, 0.08);
	--ticse-card-padding:     32px 28px 28px;
	--ticse-star-filled:      #f6ad55;
	--ticse-star-empty:       #e2e8f0;
	--ticse-review-color:     #4a5568;
	--ticse-name-color:       #1a202c;
	--ticse-designation-color:#718096;
	--ticse-company-color:    #4299e1;
	--ticse-quote-color:      #e2e8f0;
	--ticse-arrow-color:      #1a202c;
	--ticse-arrow-bg:         #ffffff;
	--ticse-gap:              24px;
	--ticse-cols-desktop:     3;
	--ticse-cols-tablet:      2;
	--ticse-cols-mobile:      1;

	box-sizing: border-box;
	width: 100%;
	font-family: inherit;
}

/* =========================================================
   Card Base
   ========================================================= */
.ticse-tp-card {
	display: flex;
	height: 100%;
}

.ticse-tp-card-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	background-color: var(--ticse-card-bg, #ffffff);
	border-radius: var(--ticse-card-radius, 16px);
	box-shadow: var(--ticse-card-shadow, 0 8px 32px rgba(0, 0, 0, 0.08));
	padding: var(--ticse-card-padding, 32px 28px 28px);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	overflow: hidden;
}

.ticse-tp-card-inner:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   Stars
   ========================================================= */
.ticse-tp-stars {
	display: flex;
	gap: 3px;
	margin-bottom: 16px;
	line-height: 1;
}

.ticse-tp-star {
	font-size: 20px;
	color: var(--ticse-star-empty, #e2e8f0);
	transition: color 0.1s ease;
}

.ticse-tp-star.filled {
	color: var(--ticse-star-filled, #f6ad55);
}

/* =========================================================
   Review Text
   ========================================================= */
.ticse-tp-review {
	flex: 1;
	margin-bottom: 24px;
}

.ticse-tp-review p {
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
	color: var(--ticse-review-color, #4a5568);
}

/* =========================================================
   Author Block
   ========================================================= */
.ticse-tp-author {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: auto;
}

.ticse-tp-author-image {
	flex-shrink: 0;
}

.ticse-tp-author-image img.ticse-tp-img {
	display: block;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	object-position: center top;
}

.ticse-tp-avatar-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #ffffff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.ticse-tp-author-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.ticse-tp-name {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: var(--ticse-name-color, #1a202c);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.ticse-tp-designation {
	display: block;
	font-size: 13px;
	color: var(--ticse-designation-color, #718096);
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ticse-tp-company {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: var(--ticse-company-color, #4299e1);
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* =========================================================
   Quote Icon
   ========================================================= */
.ticse-tp-quote-icon {
	position: absolute;
	bottom: 20px;
	right: 22px;
	color: var(--ticse-quote-color, #e2e8f0);
	line-height: 0;
	pointer-events: none;
	user-select: none;
	opacity: 0.7;
}

.ticse-tp-quote-icon svg {
	display: block;
}

/* =========================================================
   Grid Layout
   ========================================================= */
.ticse-tp-grid {
	display: grid;
	grid-template-columns: repeat(var(--ticse-cols-desktop, 3), 1fr);
	gap: var(--ticse-gap, 24px);
	align-items: stretch;
}

/* =========================================================
   Slider Layout
   ========================================================= */
.ticse-tp-slider {
	position: relative;
}

.ticse-tp-swiper-outer {
	position: relative;
	/* Bottom padding makes room for the arrows + dots row */
	padding: 0 0 64px;
}

.ticse-tp-swiper-outer .swiper {
	overflow: hidden;
}

.ticse-tp-swiper-outer .swiper-wrapper {
	align-items: stretch;
}

.ticse-tp-swiper-outer .swiper-slide {
	height: auto;
}

.ticse-tp-swiper-outer .swiper-slide .ticse-tp-card {
	height: 100%;
}

/* =========================================================
   Pagination dots — centred in the bottom bar
   ========================================================= */
.ticse-tp-pagination {
	position: absolute;
	bottom: 10px;
	left: 0;
	right: 0;
	display: flex !important;
	justify-content: center;
	align-items: center;
	gap: 6px;
	height: 40px;
	line-height: 1;
}

.ticse-tp-pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #cbd5e0;
	opacity: 1;
	cursor: pointer;
	transition: all 0.25s ease;
	display: inline-block;
}

.ticse-tp-pagination .swiper-pagination-bullet-active {
	background: #4299e1;
	width: 24px;
	border-radius: 4px;
}

/* =========================================================
   Navigation arrows — bottom-centre, flanking the dots
   ========================================================= */
.ticse-tp-btn-prev,
.ticse-tp-btn-next {
	position: absolute;
	/* Sit in the same horizontal strip as the dots */
	bottom: 10px;
	top: auto;
	z-index: 10;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	background-color: var(--ticse-arrow-bg, #ffffff);
	color: var(--ticse-arrow-color, #1a202c);
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
	padding: 0;
	line-height: 1;
}

.ticse-tp-btn-prev:hover,
.ticse-tp-btn-next:hover {
	background-color: #4299e1;
	border-color: #4299e1;
	color: #ffffff;
	box-shadow: 0 4px 16px rgba(66, 153, 225, 0.3);
}

/*
 * Offset from the centre to sit just outside the dot cluster.
 * Adjust the px value if you have many dots.
 */
.ticse-tp-btn-prev {
	left: calc(50% - 90px);
	transform: translateX(-50%);
}

.ticse-tp-btn-next {
	right: calc(50% - 90px);
	transform: translateX(50%);
}

.ticse-tp-btn-prev svg,
.ticse-tp-btn-next svg {
	display: block;
	pointer-events: none;
}

.ticse-tp-btn-prev.swiper-button-disabled,
.ticse-tp-btn-next.swiper-button-disabled {
	opacity: 0.35;
	pointer-events: none;
}

/* =========================================================
   Load More
   ========================================================= */
.ticse-tp-loadmore-wrap {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.ticse-tp-loadmore-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 36px;
	background-color: #4299e1;
	color: #ffffff;
	font-size: 15px;
	font-weight: 600;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	letter-spacing: 0.01em;
	line-height: 1;
}

.ticse-tp-loadmore-btn:hover {
	background-color: #3182ce;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(66, 153, 225, 0.35);
}

.ticse-tp-loadmore-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.ticse-tp-loadmore-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: ticse-spin 0.6s linear infinite;
}

.ticse-tp-loadmore-btn.is-loading .ticse-tp-loadmore-spinner {
	display: block;
}

.ticse-tp-loadmore-btn.is-loading .ticse-tp-loadmore-text {
	opacity: 0.8;
}

@keyframes ticse-spin {
	to { transform: rotate(360deg); }
}

/* New cards fade in */
@keyframes ticse-fade-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

.ticse-tp-card.ticse-tp-new-card {
	animation: ticse-fade-in 0.35s ease forwards;
}

/* =========================================================
   Responsive — Tablet (≤1024px)
   ========================================================= */
@media (max-width: 1024px) {
	.ticse-tp-grid {
		grid-template-columns: repeat(var(--ticse-cols-tablet, 2), 1fr);
	}
}

/* =========================================================
   Responsive — Mobile (≤767px)
   ========================================================= */
@media (max-width: 767px) {
	.ticse-tp-grid {
		grid-template-columns: repeat(var(--ticse-cols-mobile, 1), 1fr);
	}

	.ticse-tp-card-inner {
		padding: 24px 20px 20px;
	}

	.ticse-tp-review p {
		font-size: 14px;
	}

	/* On small screens use slightly tighter offset */
	.ticse-tp-btn-prev {
		left: calc(50% - 74px);
	}

	.ticse-tp-btn-next {
		right: calc(50% - 74px);
	}
}

.ticse-tp-btn-prev,
.ticse-tp-btn-next,
.swiper-button-prev,
.swiper-button-next {
    display: none !important;
}