/* Frontend Styles for Google Business Reviews Plugin */

.gbr-reviews {
	margin: 20px 0;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* List Layout */
.gbr-layout-list .gbr-review-item {
	display: flex;
	padding: 20px;
	margin-bottom: 20px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	transition: box-shadow 0.3s;
}

.gbr-layout-list .gbr-review-item:hover {
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gbr-layout-list .gbr-review-item:last-child {
	margin-bottom: 0;
}

/* Grid Layout */
.gbr-layout-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

.gbr-layout-grid .gbr-review-item {
	padding: 20px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.3s;
}

.gbr-layout-grid .gbr-review-item:hover {
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Slider Layout */
.gbr-layout-slider {
	position: relative;
}

.gbr-slider-wrapper {
	position: relative;
	overflow: hidden;
}

.gbr-slider {
	display: flex;
	transition: transform 0.3s ease;
}

.gbr-layout-slider .gbr-review-item {
	flex: 0 0 100%;
	padding: 20px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	margin-right: 20px;
	box-sizing: border-box;
}

.gbr-slider-nav {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 20px;
}

.gbr-slider-nav button {
	padding: 10px 20px;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.3s;
}

.gbr-slider-nav button:hover {
	background: #005a87;
}

.gbr-slider-nav button:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* Review Item Components */
.gbr-reviewer-photo {
	flex-shrink: 0;
	margin-right: 15px;
}

.gbr-reviewer-photo img {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
}

.gbr-review-content {
	flex: 1;
}

.gbr-reviewer-name {
	font-weight: bold;
	font-size: 16px;
	margin-bottom: 8px;
}

.gbr-rating {
	margin-bottom: 10px;
}

.gbr-stars {
	font-size: 18px;
	line-height: 1;
}

.gbr-star {
	display: inline-block;
	margin-right: 2px;
}

.gbr-star-empty {
	opacity: 0.3;
}

.gbr-comment {
	margin: 15px 0;
	line-height: 1.6;
}

.gbr-date {
	font-size: 12px;
	color: #666;
	margin-top: 10px;
}

.gbr-reply {
	margin-top: 15px;
	padding: 15px;
	background: #f5f5f5;
	border-left: 3px solid #0073aa;
	border-radius: 4px;
	font-size: 14px;
}

.gbr-reply strong {
	display: block;
	margin-bottom: 5px;
}

.gbr-error {
	padding: 15px;
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
}

/* Animation */
.gbr-animated .gbr-review-item {
	animation: fadeInUp 0.6s ease-out;
	animation-fill-mode: both;
}

.gbr-animated .gbr-review-item:nth-child(1) { animation-delay: 0.1s; }
.gbr-animated .gbr-review-item:nth-child(2) { animation-delay: 0.2s; }
.gbr-animated .gbr-review-item:nth-child(3) { animation-delay: 0.3s; }
.gbr-animated .gbr-review-item:nth-child(4) { animation-delay: 0.4s; }
.gbr-animated .gbr-review-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Text Modes */
.gbr-text-mode-scroll .gbr-scrollable-text {
	max-height: 150px;
	overflow-y: auto;
	padding-right: 10px;
}

.gbr-text-mode-scroll .gbr-scrollable-text::-webkit-scrollbar {
	width: 6px;
}

.gbr-text-mode-scroll .gbr-scrollable-text::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 3px;
}

.gbr-text-mode-scroll .gbr-scrollable-text::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 3px;
}

.gbr-text-mode-scroll .gbr-scrollable-text::-webkit-scrollbar-thumb:hover {
	background: #555;
}

/* Alignment */
.gbr-reviews[style*="text-align: center"] .gbr-review-item {
	text-align: center;
}

.gbr-reviews[style*="text-align: right"] .gbr-review-item {
	text-align: right;
}

.gbr-reviews[style*="text-align: justify"] .gbr-review-item {
	text-align: justify;
}

/* Grid layout alignment fix */
.gbr-layout-grid .gbr-review-item {
	text-align: left;
}

/* Responsive */
@media (max-width: 768px) {
	.gbr-layout-grid {
		grid-template-columns: 1fr;
	}
	
	.gbr-layout-list .gbr-review-item {
		flex-direction: column;
	}
	
	.gbr-reviewer-photo {
		margin-right: 0;
		margin-bottom: 15px;
	}
}

