/**
 * Amazon Reviews Widget - Frontend Styles
 * Matches the design mockup provided
 */

/* Main widget container */
.arw-widget {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
	max-width: 100%;
	margin: 0 auto 30px;
	background: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Optional Header */
.arw-header {
	display: flex;
	align-items: center;
	padding: 16px 24px;
	background: #f8f9fa;
	border-bottom: 1px solid #e9ecef;
}

.arw-header-content {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.arw-amazon-logo {
	height: 30px;
	width: auto;
	display: block;
}

.arw-excellent {
	font-weight: 600;
	color: #232f3e;
	font-size: 16px;
}

.arw-rating-number {
	font-weight: 700;
	color: #232f3e;
	font-size: 16px;
}

.arw-review-count {
	color: #565959;
	font-size: 14px;
	margin-left: 4px;
}

/* Star ratings */
.arw-stars {
	display: inline-flex;
	gap: 2px;
	line-height: 1;
}

.arw-star {
	color: #FFA41C;
	font-size: 18px;
}

.arw-star-full {
	color: #FFA41C;
}

.arw-star-half {
	color: #FFA41C;
	opacity: 0.5;
}

.arw-star-empty {
	color: #ddd;
}

/* Carousel wrapper */
.arw-carousel-wrapper {
	position: relative;
	padding: 24px 60px;
}

.arw-carousel-container {
	overflow: hidden;
	width: 100%;
}

.arw-carousel-track {
	display: flex;
	transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
	gap: 16px;
}

/* Review cards */
.arw-review-card {
	flex: 0 0 calc(33.333% - 11px);
	background: #f9f9f9;
	border-radius: 8px;
	padding: 20px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	min-height: 280px;
}

.arw-review-rating {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.arw-verified-badge {
	height: 18px;
	width: auto;
}

.arw-review-title {
	font-size: 16px;
	font-weight: 600;
	color: #0F1111;
	margin: 0 0 12px 0;
	line-height: 1.4;
}

.arw-review-text {
	flex: 1;
	margin-bottom: 16px;
}

.arw-review-text-content {
	color: #0F1111;
	font-size: 14px;
	line-height: 1.6;
	margin-bottom: 8px;
}

.arw-read-more {
	background: none;
	border: none;
	color: #007185;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	padding: 0;
	text-decoration: none;
	transition: color 0.2s;
}

.arw-read-more:hover {
	color: #C7511F;
	text-decoration: underline;
}

.arw-review-text.expanded .arw-review-text-content {
	display: none;
}

.arw-review-text.expanded .arw-review-text-full {
	display: block !important;
	color: #0F1111;
	font-size: 14px;
	line-height: 1.6;
	margin-bottom: 8px;
}

/* Reviewer info */
.arw-reviewer {
	display: flex;
	align-items: center;
	gap: 12px;
}

.arw-reviewer-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #d5d9d9;
	flex-shrink: 0;
}

.arw-reviewer-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.arw-reviewer-name {
	font-weight: 600;
	font-size: 14px;
	color: #0F1111;
}

.arw-review-date {
	font-size: 13px;
	color: #565959;
}

/* Navigation arrows */
.arw-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid #d5d9d9;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	color: #0F1111;
	cursor: pointer;
	z-index: 10;
	transition: all 0.2s;
	padding: 0;
	line-height: 1;
}

.arw-nav:hover:not(:disabled) {
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	color: #C7511F;
}

.arw-nav:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.arw-nav-prev {
	left: 8px;
}

.arw-nav-next {
	right: 8px;
}

/* Error and empty states */
.arw-error,
.arw-empty {
	padding: 40px 20px;
	text-align: center;
}

.arw-error-message,
.arw-empty-message {
	color: #565959;
	font-size: 15px;
}

.arw-error p,
.arw-empty p {
	margin: 0;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
	.arw-review-card {
		flex: 0 0 calc(50% - 8px);
	}
}

@media (max-width: 768px) {
	.arw-carousel-wrapper {
		padding: 20px 50px;
	}

	.arw-review-card {
		flex: 0 0 100%;
	}

	.arw-header-content {
		gap: 8px;
		font-size: 14px;
	}

	.arw-amazon-logo {
		height: 24px;
	}

	.arw-excellent,
	.arw-rating-number {
		font-size: 14px;
	}

	.arw-review-count {
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	.arw-carousel-wrapper {
		padding: 16px 40px;
	}

	.arw-nav {
		width: 36px;
		height: 36px;
		font-size: 24px;
	}

	.arw-header {
		padding: 12px 16px;
	}

	.arw-review-card {
		padding: 16px;
		min-height: 240px;
	}

	.arw-review-title {
		font-size: 15px;
	}

	.arw-review-text-content {
		font-size: 13px;
	}
}

/* Loading state */
.arw-widget.arw-loading {
	min-height: 300px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.arw-widget.arw-loading::after {
	content: '';
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #FF9900;
	border-radius: 50%;
	animation: arw-spin 1s linear infinite;
}

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

/* Accessibility */
.arw-nav:focus {
	outline: 2px solid #007185;
	outline-offset: 2px;
}

.arw-read-more:focus {
	outline: 2px solid #007185;
	outline-offset: 2px;
}

/* Print styles */
@media print {
	.arw-nav {
		display: none;
	}

	.arw-carousel-track {
		transform: none !important;
		flex-wrap: wrap;
	}

	.arw-review-card {
		break-inside: avoid;
	}
}
