/* ============================================================
   Stacked Cards Layout Stylesheet
   ============================================================ */

.otp-layout-stacked-cards {
	--ot-text-primary: #1e293b;
	--ot-text-secondary: #64748b;
	--ot-accent-color: #3b82f6;
	--ot-card-bg: #ffffff;
	--ot-text-color: var(--ot-text-primary);
	--ot-name-color: var(--ot-accent-color);
	--ot-role-color: var(--ot-text-secondary);
	--ot-quote-color: var(--ot-text-secondary);
	--ot-arrow-color: var(--ot-text-secondary);
	--ot-bullet-color: var(--ot-text-secondary);
	--ot-bullet-active-color: var(--ot-accent-color);
	--ot-transition-speed: 600ms;

	position: relative;
	width: 100%;
	margin: 0 auto;
	padding: 40px 0 20px 0;
	box-sizing: border-box;
	overflow: hidden;
}

.otp-stacked-deck-container {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
	width: 100%;
	max-width: 600px;
	box-sizing: border-box;
}

.otp-stacked-deck-stage {
	perspective: 1200px;
	overflow: visible;
	width: 100%;
	max-width: 380px;
	height: auto;
	min-height: 440px;
	position: relative;
	box-sizing: border-box;
}

.otp-stacked-deck {
	position: relative;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
}

.otp-layout-stacked-cards .otp-stacked-card {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	min-height: 380px;
	height: auto;
	border-radius: 24px !important;
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25), 0 5px 15px rgba(0, 0, 0, 0.15);
	transition: transform var(--ot-transition-speed, 0.6s) cubic-bezier(0.25, 0.8, 0.25, 1), opacity var(--ot-transition-speed, 0.6s) ease, z-index var(--ot-transition-speed, 0.6s) step-end;
	transform-origin: center bottom;
	pointer-events: none;
	box-sizing: border-box;
	border: 1px solid rgba(255, 255, 255, 0.08);
	user-select: none;
	-webkit-user-drag: none;
	background-color: #ffffff !important;
	background: var(--ot-card-bg, #ffffff) !important;
}

/* Enable pointer events on active card only */
.otp-layout-stacked-cards .otp-stacked-card.is-active {
	pointer-events: auto;
	cursor: grab;
}

.otp-layout-stacked-cards .otp-stacked-card-inner {
	height: 100%;
	padding: 32px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background-color: #ffffff !important;
	background: var(--ot-card-bg, #ffffff) !important;
	color: var(--ot-text-primary, inherit) !important;
	border-radius: 23px !important;
	position: relative;
	overflow: hidden;
}

.otp-stacked-quote-icon {
	position: absolute;
	top: 24px;
	right: 24px;
	opacity: 0.15;
	pointer-events: none;
	color: var(--ot-quote-color, inherit);
}

.otp-stacked-author {
	display: flex;
	justify-content: center;
	margin-bottom: 12px;
}

.otp-layout-stacked-cards .otp-stacked-avatar-wrap {
	position: relative;
	width: 80px;
	height: 80px;
	border-radius: 50% !important;
	border: 3px solid rgba(255, 255, 255, 0.15);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	box-sizing: border-box;
	background: rgba(255, 255, 255, 0.05);
	overflow: visible !important;
}

.otp-layout-stacked-cards .otp-stacked-avatar-wrap img,
.otp-layout-stacked-cards .otp-stacked-avatar-img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	border-radius: 50% !important;
	overflow: hidden !important;
	display: block !important;
}

.otp-layout-stacked-cards .otp-stacked-avatar-initials {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50% !important;
	font-weight: 700;
	font-size: 1.5rem;
	background: linear-gradient(135deg, #4776e6, #8e54e9); /* fallback */
	color: #fff;
}

/* Cycling gradients per card */
.otp-layout-stacked-cards .otp-stacked-card:nth-child(6n+1) .otp-stacked-avatar-initials { background: linear-gradient(135deg, #4776e6, #8e54e9); }
.otp-layout-stacked-cards .otp-stacked-card:nth-child(6n+2) .otp-stacked-avatar-initials { background: linear-gradient(135deg, #0ba360, #3cba92); }
.otp-layout-stacked-cards .otp-stacked-card:nth-child(6n+3) .otp-stacked-avatar-initials { background: linear-gradient(135deg, #f7971e, #ffd200); }
.otp-layout-stacked-cards .otp-stacked-card:nth-child(6n+4) .otp-stacked-avatar-initials { background: linear-gradient(135deg, #f953c6, #b91d73); }
.otp-layout-stacked-cards .otp-stacked-card:nth-child(6n+5) .otp-stacked-avatar-initials { background: linear-gradient(135deg, #1a85ff, #00c6fb); }
.otp-layout-stacked-cards .otp-stacked-card:nth-child(6n+6) .otp-stacked-avatar-initials { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }

.otp-layout-stacked-cards .otp-stacked-social-badge-link {
	display: block;
	text-decoration: none;
}

.otp-layout-stacked-cards .otp-stacked-social-badge {
	position: absolute;
	bottom: -2px;
	right: -2px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #555;
	color: #fff;
	padding: 4px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid var(--ot-card-bg, #ffffff);
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
	z-index: 5;
	transition: transform 0.2s ease;
}

.otp-layout-stacked-cards .otp-stacked-social-badge-link:hover .otp-stacked-social-badge {
	transform: scale(1.15);
}

.otp-layout-stacked-cards .otp-stacked-social-badge svg {
	width: 14px;
	height: 14px;
	display: block;
	fill: currentColor;
}

/* Brand colors */
.otp-layout-stacked-cards .otp-stacked-social-badge--facebook    { background: #1877f2; color: #fff; }
.otp-layout-stacked-cards .otp-stacked-social-badge--instagram   { background: radial-gradient(circle at 30% 110%, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: #fff; }
.otp-layout-stacked-cards .otp-stacked-social-badge--linkedin    { background: #0a66c2; color: #fff; }
.otp-layout-stacked-cards .otp-stacked-social-badge--twitter     { background: #000; color: #fff; }
.otp-layout-stacked-cards .otp-stacked-social-badge--youtube     { background: #ff0000; color: #fff; }
.otp-layout-stacked-cards .otp-stacked-social-badge--tiktok      { background: #010101; color: #fff; }
.otp-layout-stacked-cards .otp-stacked-social-badge--google      { background: #fff; color: inherit; }
.otp-layout-stacked-cards .otp-stacked-social-badge--trustpilot  { background: #00b67a; color: #fff; }

.otp-layout-stacked-cards .otp-stacked-social-badge--google svg  { color: unset; }

.otp-stacked-star-rating {
	text-align: center;
	margin-bottom: 12px;
	color: #ffb703;
}

.otp-stacked-star {
	font-size: 1.25rem;
	margin: 0 2px;
}

.otp-stacked-text {
	text-align: center;
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 12px;
	overflow-y: visible;
	flex-grow: 1;
	scrollbar-width: none;
	max-height: none;
}

.otp-stacked-text::-webkit-scrollbar {
	width: 4px;
}

.otp-stacked-text::-webkit-scrollbar-track {
	background: transparent;
}

.otp-stacked-text::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.15);
	border-radius: 2px;
}

.otp-stacked-author-info {
	text-align: center;
}

.otp-stacked-name {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 4px 0;
	color: var(--ot-name-color, inherit);
}

.otp-stacked-role {
	font-size: 0.85rem;
	margin: 0;
	color: var(--ot-role-color, inherit);
	opacity: 0.85;
}

.otp-stacked-company-logo {
	max-height: 22px;
	margin-top: 8px;
	width: auto;
	display: inline-block;
}

/* ============================================================
   Navigation Arrows (Main cards)
   ============================================================ */

.otp-stacked-nav-btn {
	position: absolute;
	top: 45%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: none;
	background: var(--ot-card-bg, rgba(15, 15, 25, 0.6)) !important;
	backdrop-filter: blur(10px);
	color: var(--ot-arrow-color, #fff) !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s, transform 0.3s, color 0.3s, box-shadow 0.3s;
	z-index: 20;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.otp-stacked-nav-btn svg {
	display: block;
}

.otp-stacked-nav-btn:focus,
.otp-stacked-nav-btn:active {
	background: var(--ot-card-bg, rgba(15, 15, 25, 0.6)) !important;
	color: var(--ot-arrow-color, #fff) !important;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
	outline: none !important;
}

.otp-stacked-nav-btn:hover,
.otp-stacked-nav-btn:focus:hover {
	background: var(--ot-bullet-active-color, #7c3aed) !important;
	color: #fff !important;
	box-shadow: 0 6px 20px color-mix(in srgb, var(--ot-bullet-active-color, #7c3aed) 40%, transparent) !important;
	transform: translateY(-50%) scale(1.08) !important;
}

.otp-stacked-prev {
	left: -64px;
}

.otp-stacked-next {
	right: -64px;
}

/* ============================================================
   Reviewer Avatars Row Navigation
   ============================================================ */



/* ============================================================
   Pagination Dots
   ============================================================ */

.otp-stacked-pagination-bullets {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

.otp-stacked-bullet {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--ot-bullet-color, rgba(255, 255, 255, 0.25));
	opacity: 0.4;
	cursor: pointer;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.otp-stacked-bullet:hover {
	opacity: 0.8;
}

.otp-stacked-bullet.active {
	background: var(--ot-bullet-active-color, #7c3aed);
	opacity: 1;
	width: 24px;
	border-radius: 5px;
}

/* ============================================================
   Draggable Swipe & Animation helpers
   ============================================================ */

.otp-layout-stacked-cards .otp-stacked-card.is-dragging {
	transition: none !important;
	cursor: grabbing;
	z-index: 100 !important;
}

.otp-layout-stacked-cards .otp-stacked-card.is-throwing {
	transition: transform 0.4s ease-out, opacity 0.4s ease-out !important;
}

/* ============================================================
   Mobile Viewports and Responsiveness
   ============================================================ */

@media (max-width: 600px) {
	.otp-stacked-deck-stage {
		max-width: 320px;
		height: 400px;
	}

	.otp-stacked-card {
		height: 340px;
	}

	.otp-stacked-prev {
		left: 10px;
	}

	.otp-stacked-next {
		right: 10px;
	}

	.otp-stacked-nav-btn {
		width: 40px;
		height: 40px;
	}
}

/* ── Resilience: force transitions even if theme overrides them ──────────── */
.otp-layout-stacked-cards .otp-stacked-nav-btn      { transition: all 0.25s ease !important; }
.otp-layout-stacked-cards .otp-stacked-card         { transition: transform var(--ot-transition-speed, 0.6s) cubic-bezier(0.25, 0.8, 0.25, 1), opacity var(--ot-transition-speed, 0.6s) ease, z-index var(--ot-transition-speed, 0.6s) step-end !important; }
.otp-layout-stacked-cards .otp-stacked-card-inner   { transition: background 0.3s ease, border-color 0.3s ease !important; }
.otp-layout-stacked-cards .otp-stacked-bullet       { transition: all 0.3s ease !important; }
