/**
 * Jason Hartman Testimonials Plugin Styles
 *
 * @package JasonHartmanTestimonials
 * @since 1.0.0
 */

/* Testimonials Container - Bootstrap-like Grid */
.jht-testimonials-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin: 20px 0;
	padding: 0;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

/* Scrollable Container */
.jht-testimonials-container[data-scrollable="true"] {
	max-height: 50vh;
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 10px;
}

/* Custom Scrollbar Styling - Only for scrollable containers */
.jht-testimonials-container[data-scrollable="true"]::-webkit-scrollbar {
	width: 8px;
}

.jht-testimonials-container[data-scrollable="true"]::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.jht-testimonials-container[data-scrollable="true"]::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 4px;
	transition: background 0.3s ease;
}

.jht-testimonials-container[data-scrollable="true"]::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

.jht-testimonials-container[data-scrollable="true"]::-webkit-scrollbar-thumb:active {
	background: #8a8a8a;
}

/* Firefox scrollbar styling - Only for scrollable containers */
.jht-testimonials-container[data-scrollable="true"] {
	scrollbar-width: thin;
	scrollbar-color: #c1c1c1 #f1f1f1;
}


/* Testimonial Card */
.jht-testimonial-card {
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	padding: 20px;
	transition: box-shadow 0.3s ease, transform 0.2s ease;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Responsive Grid - Bootstrap-like breakpoints */
/* Extra small devices (phones, less than 576px) - 1 column */
@media (max-width: 575.98px) {
	.jht-testimonials-container {
		grid-template-columns: 1fr;
		padding: 0 15px;
	}
}

/* Small devices (landscape phones, 576px and up) - 2 columns */
@media (min-width: 576px) and (max-width: 767.98px) {
	.jht-testimonials-container {
		grid-template-columns: repeat(2, 1fr);
		padding: 0 20px;
	}
}

/* Medium devices (tablets, 768px and up) - 3 columns */
@media (min-width: 768px) and (max-width: 991.98px) {
	.jht-testimonials-container {
		grid-template-columns: repeat(3, 1fr);
		padding: 0 20px;
	}
}

/* Large devices (desktops, 992px and up) - 4 columns */
@media (min-width: 992px) {
	.jht-testimonials-container {
		grid-template-columns: repeat(4, 1fr);
		padding: 0 20px;
	}
}

/* Extra large devices (large desktops, 1200px and up) - 4 columns */
@media (min-width: 1200px) {
	.jht-testimonials-container {
		grid-template-columns: repeat(4, 1fr);
		max-width: 1200px;
		padding: 0;
	}
}


.jht-testimonial-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}

/* Testimonial Header */
.jht-testimonial-header {
	display: flex;
	align-items: flex-start;
	gap: 15px;
	margin-bottom: 15px;
}

/* Avatar */
.jht-avatar {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	font-weight: bold;
	font-size: 18px;
	flex-shrink: 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Testimonial Info */
.jht-testimonial-info {
	flex: 1;
	min-width: 0;
}

.jht-reviewer-name {
	margin: 0 0 8px 0;
	font-size: 16px;
	font-weight: 600;
	color: #2c3e50;
	line-height: 1.3;
}

/* Rating and Date */
.jht-rating-date {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.jht-stars {
	display: flex;
	gap: 2px;
}

.jht-stars .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 1;
}

.jht-star-filled {
	color: #ffd700;
}

.jht-star-empty {
	color: #e0e0e0;
}

.jht-review-date {
	font-size: 13px;
	color: #7f8c8d;
	font-weight: 400;
}

/* Testimonial Content */
.jht-testimonial-content {
	margin-bottom: 15px;
	line-height: 1.6;
	color: #34495e;
	font-size: 14px;
}

/* Comment Text Container */
.jht-comment-text {
	position: relative;
}

/* Read More Button */
.jht-read-more-container {
	margin-top: 10px;
	text-align: center;
}

.jht-read-more-btn {
	background: none;
	border: none;
	color: #4a90e2;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	padding: 5px 10px;
	text-decoration: none;
	transition: color 0.3s ease;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.jht-read-more-btn:hover {
	color: #357abd;
	background-color: #f8f9fa;
}

.jht-read-more-btn:focus {
	outline: 2px solid #4a90e2;
	outline-offset: 2px;
}

.jht-read-more-btn .dashicons {
	font-size: 12px;
	width: 12px;
	height: 12px;
}

.jht-testimonial-content p {
	margin: 0 0 10px 0;
}

.jht-testimonial-content p:last-child {
	margin-bottom: 0;
}

/* Read More Link */
.jht-read-more {
	color: #7f8c8d;
	text-decoration: none;
	font-size: 13px;
	font-style: italic;
}

.jht-read-more:hover {
	color: #3498db;
	text-decoration: underline;
}

/* Testimonial Attribution */
.jht-testimonial-attribution {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: #7f8c8d;
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #ecf0f1;
}

.jht-testimonial-attribution .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	color: #bdc3c7;
}

/* Review Photo Placeholder */
.jht-review-photo {
	width: 100%;
	height: 120px;
	background: #f8f9fa;
	border: 2px dashed #dee2e6;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6c757d;
	font-size: 12px;
	font-style: italic;
	margin: 10px 0;
}

/* Loading State */
.jht-testimonials-loading {
	text-align: center;
	padding: 40px 20px;
	color: #7f8c8d;
}

.jht-testimonials-loading .dashicons {
	font-size: 24px;
	animation: jht-spin 1s linear infinite;
}

@keyframes jht-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Error State */
.jht-testimonials-error {
	background: #f8d7da;
	color: #721c24;
	padding: 15px;
	border-radius: 8px;
	border: 1px solid #f5c6cb;
	margin: 20px 0;
}

/* Accessibility Improvements */
.jht-testimonial-card:focus-within {
	outline: 2px solid #3498db;
	outline-offset: 2px;
}

.jht-stars .dashicons {
	transition: color 0.2s ease;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.jht-testimonial-card {
		border: 2px solid #000000;
	}
	
	.jht-star-empty {
		color: #cccccc;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.jht-testimonial-card {
		transition: none;
	}
	
	.jht-testimonials-loading .dashicons {
		animation: none;
	}
}

/* Print Styles */
@media print {
	.jht-testimonials-container {
		display: block;
	}
	
	.jht-testimonial-card {
		box-shadow: none;
		border: 1px solid #000000;
		margin-bottom: 20px;
		page-break-inside: avoid;
	}
	
	.jht-avatar {
		background: #000000 !important;
		color: #ffffff !important;
	}
}
