/**
 * NJ Review Widget Stylesheet
 * Inspired by modern White Polar Inc testimonial card aesthetics.
 */

.nj-review-widget-wrapper {
	width: 100%;
	position: relative;
	box-sizing: border-box;
}

.nj-reviews-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	width: 100%;
	box-sizing: border-box;
}

/* Equal Height Support */
.nj-reviews-grid.nj-equal-height .nj-review-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.nj-reviews-grid.nj-equal-height .nj-review-card-body {
	flex: 1 1 auto;
}

/* Fixed Height Support */
.nj-reviews-grid.nj-fixed-height-active .nj-review-card {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

.nj-reviews-grid.nj-fixed-height-active .nj-review-card-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding-right: 4px;
}

/* Custom smooth scrollbar for fixed height cards */
.nj-reviews-grid.nj-fixed-height-active .nj-review-card-body::-webkit-scrollbar {
	width: 5px;
}

.nj-reviews-grid.nj-fixed-height-active .nj-review-card-body::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.03);
	border-radius: 4px;
}

.nj-reviews-grid.nj-fixed-height-active .nj-review-card-body::-webkit-scrollbar-thumb {
	background: rgba(148, 163, 184, 0.4);
	border-radius: 4px;
}

.nj-reviews-grid.nj-fixed-height-active .nj-review-card-body::-webkit-scrollbar-thumb:hover {
	background: rgba(100, 116, 139, 0.6);
}

/* Card Styling */
.nj-review-card {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 28px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
	position: relative;
	overflow: hidden;
}

.nj-review-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
	border-color: #cbd5e1;
}

/* Card Header */
.nj-review-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
	gap: 12px;
}

/* Quote Icon */
.nj-review-quote-icon {
	width: 44px;
	height: 44px;
	min-width: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(37, 99, 235, 0.08);
	border-radius: 12px;
	color: #2563eb;
	transition: all 0.25s ease;
}

.nj-review-card:hover .nj-review-quote-icon {
	background-color: #2563eb;
	color: #ffffff;
}

.nj-review-card:hover .nj-review-quote-icon svg {
	fill: #ffffff;
}

.nj-review-quote-icon i {
	font-size: 20px;
	line-height: 1;
}

.nj-review-quote-icon svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Rating Stars */
.nj-review-stars {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	line-height: 1;
	user-select: none;
}

.nj-star {
	font-size: 16px;
	color: #e5e7eb;
	transition: color 0.2s ease;
}

.nj-star-active {
	color: #f59e0b;
}

/* Card Body / Text */
.nj-review-card-body {
	margin-bottom: 22px;
}

.nj-review-card-text {
	color: #475569;
	font-size: 15px;
	line-height: 1.65;
	word-wrap: break-word;
}

/* Card Meta (Footer with Author Info) */
.nj-review-card-meta {
	display: flex;
	align-items: center;
	margin-top: auto;
}

/* Avatar / Profile */
.nj-reviewer-avatar {
	width: 52px;
	height: 52px;
	min-width: 52px;
	min-height: 52px;
	border-radius: 50%;
	overflow: hidden;
	margin-right: 14px;
	background-color: #eff6ff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

.nj-reviewer-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nj-reviewer-avatar-icon {
	color: #2563eb;
	font-size: 26px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nj-reviewer-initials {
	color: #2563eb;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	user-select: none;
}

/* Reviewer Details */
.nj-reviewer-details {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nj-reviewer-name {
	font-size: 17px;
	font-weight: 600;
	color: #0f172a;
	line-height: 1.3;
	margin-bottom: 3px;
	word-break: break-word;
}

.nj-reviewer-title {
	font-size: 13px;
	color: #64748b;
	line-height: 1.35;
	word-break: break-word;
}

/* Responsive Breakpoints */
@media screen and (max-width: 1024px) {
	.nj-reviews-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}
	.nj-review-card {
		padding: 24px;
	}
}

@media screen and (max-width: 640px) {
	.nj-reviews-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.nj-review-card {
		padding: 20px;
	}
	.nj-review-card-header {
		margin-bottom: 14px;
	}
}
