/**
 * Premium frontend stylesheet for TripAdvisor Review Slider
 */

/* Main Variables & Design Tokens */
.ta-slider-widget-container {
	--ta-primary-color: #00aa6c;       /* TripAdvisor Green */
	--ta-primary-hover: #008f5a;
	--ta-star-color: #00aa6c;
	--ta-transition-speed: 0.4s;
	
	/* Layout & Spacing */
	--ta-gap: 20px;
	
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	margin: 24px 0;
	padding: 20px;
	border-radius: 12px;
	box-sizing: border-box;
}

.ta-slider-widget-container * {
	box-sizing: border-box;
}

/* ==========================================
   Themes Implementation
   ========================================== */

/* Light Theme */
.ta-slider-widget-container.ta-theme-light {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	--ta-card-bg: #ffffff;
	--ta-text-color: #212529;
	--ta-text-muted: #6c757d;
	--ta-border-color: #dee2e6;
	--ta-shadow: 0 4px 12px rgba(0,0,0,0.05);
	--ta-btn-bg: #212529;
	--ta-btn-color: #ffffff;
}

/* Dark Theme */
.ta-slider-widget-container.ta-theme-dark {
	background: #121212;
	border: 1px solid #2d2d2d;
	--ta-card-bg: #1e1e1e;
	--ta-text-color: #f8f9fa;
	--ta-text-muted: #a0a0a0;
	--ta-border-color: #333333;
	--ta-shadow: 0 4px 20px rgba(0,0,0,0.4);
	--ta-btn-bg: #ffffff;
	--ta-btn-color: #121212;
}

/* Glassmorphism Theme */
.ta-slider-widget-container.ta-theme-glassmorphism {
	background: rgba(255, 255, 255, 0.45);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.25);
	--ta-card-bg: rgba(255, 255, 255, 0.7);
	--ta-text-color: #1a202c;
	--ta-text-muted: #4a5568;
	--ta-border-color: rgba(255, 255, 255, 0.3);
	--ta-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
	--ta-btn-bg: #00aa6c;
	--ta-btn-color: #ffffff;
}

/* Custom Theme fallback variables */
.ta-slider-widget-container.ta-theme-custom {
	background: var(--ta-card-bg);
	border: 1px solid rgba(0,0,0,0.05);
	--ta-text-muted: rgba(0,0,0,0.6);
	--ta-border-color: rgba(0,0,0,0.1);
	--ta-shadow: 0 4px 12px rgba(0,0,0,0.05);
	--ta-btn-bg: var(--ta-primary-color);
	--ta-btn-color: #ffffff;
}

/* ==========================================
   Badge Header
   ========================================== */
.ta-badge-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--ta-border-color);
	margin-bottom: 24px;
	gap: 15px;
}

.ta-brand-logo {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ta-logo-text {
	font-size: 20px;
	letter-spacing: -0.5px;
	color: var(--ta-text-color);
}

/* Cute CSS TripAdvisor Owl eye logo */
.ta-owl-logo {
	position: relative;
	width: 36px;
	height: 24px;
	background: #00aa6c;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: space-around;
	padding: 0 4px;
}

.ta-owl-logo::before {
	content: '';
	position: absolute;
	top: -3px;
	left: 50%;
	transform: translateX(-50%);
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-bottom: 4px solid #00aa6c;
}

.owl-eye {
	width: 10px;
	height: 10px;
	background: #ffffff;
	border-radius: 50%;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.owl-eye::after {
	content: '';
	width: 4px;
	height: 4px;
	background: #000;
	border-radius: 50%;
}

.ta-badge-stats {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ta-badge-stars {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ta-circle {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	display: inline-block;
	border: 1.5px solid var(--ta-star-color);
}

.ta-circle.circle-filled {
	background-color: var(--ta-star-color);
}

.ta-circle.circle-empty {
	background-color: transparent;
}

.ta-rating-number {
	font-size: 15px;
	color: var(--ta-text-color);
	margin-left: 4px;
}

.ta-badge-text {
	font-size: 13px;
	color: var(--ta-text-muted);
}

.ta-btn-write-review {
	display: inline-block;
	background-color: var(--ta-btn-bg);
	color: var(--ta-btn-color) !important;
	padding: 8px 16px;
	border-radius: 20px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	transition: transform 0.2s ease, opacity 0.2s ease;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ta-btn-write-review:hover {
	transform: translateY(-1px);
	opacity: 0.9;
}

/* ==========================================
   Slider Structure
   ========================================== */
.ta-slider-wrapper {
	position: relative;
	padding: 0 40px;
}

.ta-slider-viewport {
	overflow: hidden;
	width: 100%;
}

.ta-slider-track {
	display: flex;
	transition: transform var(--ta-transition-speed) cubic-bezier(0.25, 0.46, 0.45, 0.94);
	width: 100%;
}

.ta-slider-slide {
	flex-shrink: 0;
	padding: 0 10px; /* Gap between cards */
	transition: opacity 0.3s ease;
}

/* Card Styling */
.ta-review-card {
	background: var(--ta-card-bg);
	border: 1px solid var(--ta-border-color);
	box-shadow: var(--ta-shadow);
	padding: 24px;
	border-radius: 12px;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 230px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
}

.ta-review-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.ta-card-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.ta-card-rating {
	display: flex;
	gap: 4px;
}

.ta-card-rating .ta-circle {
	width: 10px;
	height: 10px;
}

.ta-card-date {
	font-size: 12px;
	color: var(--ta-text-muted);
}

.ta-card-title {
	margin: 0 0 10px 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--ta-text-color);
	line-height: 1.3;
}

.ta-card-text {
	margin: 0 0 20px 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--ta-text-color);
	flex-grow: 1;
}

.ta-read-more {
	color: var(--ta-primary-color) !important;
	font-weight: 600;
	text-decoration: none;
	margin-left: 5px;
	white-space: nowrap;
}

.ta-read-more:hover {
	text-decoration: underline;
}

/* Card Footer */
.ta-card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 1px solid var(--ta-border-color);
	padding-top: 15px;
	margin-top: auto;
}

.ta-author-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ta-author-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--ta-primary-color);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	box-shadow: inset 0 0 4px rgba(0,0,0,0.15);
}

.ta-author-name {
	display: flex;
	flex-direction: column;
	font-size: 13px;
	color: var(--ta-text-color);
}

.ta-verified-buyer {
	font-size: 11px;
	color: #00aa6c;
	display: flex;
	align-items: center;
	gap: 2px;
	margin-top: 2px;
}

.ta-verified-buyer .dashicons {
	font-size: 12px;
	width: 12px;
	height: 12px;
}

/* Small corner owl icon inside card footer */
.ta-mini-owl {
	width: 18px;
	height: 18px;
	background: var(--ta-border-color);
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 14h-2v-2h2v2zm0-4h-2V7h2v5z'/></svg>") no-repeat center;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'><circle cx='32' cy='50' r='18' fill='black'/><circle cx='68' cy='50' r='18' fill='black'/><circle cx='32' cy='50' r='6' fill='white'/><circle cx='68' cy='50' r='6' fill='white'/><path d='M 15 15 L 50 40 L 85 15' stroke='black' stroke-width='8' fill='none'/></svg>") no-repeat center;
	mask-size: contain;
	-webkit-mask-size: contain;
	opacity: 0.25;
}

/* ==========================================
   Arrows and Dots Navigation
   ========================================== */
.ta-nav-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--ta-card-bg);
	border: 1px solid var(--ta-border-color);
	color: var(--ta-text-color);
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
	box-shadow: var(--ta-shadow);
	transition: all 0.2s ease;
}

.ta-nav-arrow:hover {
	background: var(--ta-primary-color);
	color: #ffffff;
	border-color: var(--ta-primary-color);
	transform: translateY(-50%) scale(1.05);
}

.ta-nav-arrow.arrow-prev {
	left: 0;
}

.ta-nav-arrow.arrow-next {
	right: 0;
}

/* Dots wrapper */
.ta-slider-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 20px;
}

.ta-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ta-border-color);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: all 0.2s ease;
}

.ta-dot.active {
	background: var(--ta-primary-color);
	transform: scale(1.2);
}

/* ==========================================
   Empty / Fallback View
   ========================================== */
.ta-no-reviews-view {
	text-align: center;
	padding: 40px;
	color: var(--ta-text-muted);
	font-style: italic;
	border: 1.5px dashed var(--ta-border-color);
	border-radius: 12px;
}

/* ==========================================
   Responsive adjustments
   ========================================== */
@media (max-width: 900px) {
	.ta-slider-wrapper {
		padding: 0 30px;
	}
}

@media (max-width: 600px) {
	.ta-badge-header {
		flex-direction: column;
		text-align: center;
		padding-bottom: 24px;
	}
	
	.ta-brand-logo {
		justify-content: center;
	}

	.ta-badge-stars {
		justify-content: center;
	}

	.ta-slider-wrapper {
		padding: 0 10px;
	}

	.ta-nav-arrow {
		display: none; /* Hide arrows on small mobile, rely on touch swipe */
	}
	
	.ta-review-card {
		padding: 18px;
		min-height: 200px;
	}
}
