/* NextDigitalKey Reviews - Frontend
 * v1.4.4 — near-fit cards shrink slightly so none is clipped
 */

.ndk-reviews,
.ndk-home-reviews-wrap {
	--ndk-orange: #f59e0b;
	--ndk-orange-2: #fbbf24;
	--ndk-text: #1f2937;
	--ndk-muted: #6b7280;
	--ndk-border: #e5e7eb;
	--ndk-bg: #ffffff;
	--ndk-link: #1d4ed8;
	--ndk-blue: #1f6feb;
	--ndk-blue-2: #1668e3;
	--ndk-radius: 10px;
	--ndk-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	font-family: inherit;
	color: var(--ndk-text);
	box-sizing: border-box;
	margin: 2rem 0;
	/* Full-width guard: some themes render the widget inside a flex/grid or
	 * shrink-to-fit container, collapsing the slider to a single card. */
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	flex: 1 1 100%;
	clear: both;
}

.ndk-reviews *,
.ndk-home-reviews-wrap *,
.ndk-reviews *::before,
.ndk-reviews *::after,
.ndk-home-reviews-wrap *::before,
.ndk-home-reviews-wrap *::after {
	box-sizing: border-box;
}

.ndk-reviews-heading {
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0 0 1.25rem;
	color: var(--ndk-text);
	letter-spacing: -0.01em;
}

/* ============================================================
 * Carousel layout
 * ============================================================ */
.ndk-reviews-carousel {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 0.5rem;
	width: 100%;
}

.ndk-reviews-track-wrap {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	overflow: hidden;
	padding: 4px 2px;
}

.ndk-reviews-track {
	display: flex;
	gap: 1rem;
	scroll-behavior: smooth;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-bottom: 4px;
}

.ndk-reviews-track::-webkit-scrollbar {
	display: none;
}

.ndk-review-card {
	/* grow:1 → when there are fewer cards than fit the row, they stretch to
	 * fill the full width (no empty gap on the right); with many cards the
	 * track overflows and grow has no effect (slider behaves as before). */
	flex: 1 0 calc(25% - 0.75rem);
	min-width: 240px;
	background: var(--ndk-bg);
	border: 1px solid var(--ndk-border);
	border-radius: var(--ndk-radius);
	padding: 16px 18px;
	box-shadow: var(--ndk-shadow);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 170px;
	position: relative;
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.ndk-review-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
	transform: translateY(-1px);
}

.ndk-review-card.ndk-empty {
	align-items: center;
	justify-content: center;
	text-align: center;
	color: var(--ndk-muted);
}

.ndk-review-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

/* Stars.
 * IMPORTANT: every selector here is scoped under .ndk-reviews /
 * .ndk-floating-badge because the site theme (DIGIAYOUB) uses its own
 * "ndk-" prefixed classes (.ndk-stars, .ndk-rating-chip…) in the header —
 * unscoped rules were bleeding into the theme's UI. */
.ndk-reviews .ndk-stars {
	display: inline-flex;
	gap: 2px;
	color: var(--ndk-orange);
	font-size: 18px;
	line-height: 1;
	letter-spacing: 1px;
}

.ndk-reviews .ndk-stars .ndk-star,
.ndk-reviews .ndk-badge-stars .ndk-star {
	color: #e5e7eb;
	font-size: 18px;
}

.ndk-reviews .ndk-stars .ndk-star.is-on,
.ndk-reviews .ndk-badge-stars .ndk-star.is-on,
.ndk-floating-badge .ndk-star.is-on {
	color: var(--ndk-orange);
}

.ndk-reviews .ndk-badge-stars,
.ndk-floating-badge .ndk-badge-stars {
	color: var(--ndk-orange);
	font-size: 14px;
	letter-spacing: 1px;
	margin: 0 4px;
}

.ndk-reviews .ndk-badge-stars .ndk-star,
.ndk-floating-badge .ndk-badge-stars .ndk-star {
	color: #e5e7eb;
	font-size: 14px;
}

.ndk-reviews .ndk-badge-stars .ndk-star.is-on,
.ndk-floating-badge .ndk-badge-stars .ndk-star.is-on {
	color: var(--ndk-orange);
}

/* Verified checkmark */
.ndk-reviews .ndk-verified {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #1f6feb;
	color: #fff;
	flex-shrink: 0;
}

.ndk-reviews .ndk-verified svg { display: block; }

.ndk-review-meta {
	color: var(--ndk-muted);
	font-size: 13px;
}

.ndk-review-title {
	font-weight: 700;
	font-size: 15px;
	color: var(--ndk-text);
	line-height: 1.3;
}

.ndk-review-content {
	font-size: 14px;
	color: var(--ndk-text);
	line-height: 1.5;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.ndk-review-content .ndk-readmore {
	color: var(--ndk-link);
	text-decoration: none;
	margin-left: 4px;
	font-size: 13px;
}

.ndk-review-content .ndk-readmore:hover {
	text-decoration: underline;
}

/* ============================================================
 * Arrows
 * ============================================================ */
/* High specificity + !important on the visual props: themes (Flatsome & co.)
 * style bare `button` elements with their primary color (orange squares),
 * border-radius and padding — those must never win over the arrow look. */
.ndk-reviews .ndk-carousel-arrow,
.ndk-reviews button.ndk-carousel-arrow {
	flex: 0 0 auto;
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	max-width: 36px !important;
	padding: 0 !important;
	margin: 60px 0 0 !important;
	border-radius: 50% !important;
	border: 1px solid var(--ndk-border) !important;
	background: #fff !important;
	background-image: none !important;
	color: var(--ndk-text) !important;
	box-shadow: none !important;
	text-shadow: none !important;
	line-height: 1 !important;
	cursor: pointer;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	z-index: 2;
}

.ndk-reviews .ndk-carousel-arrow svg {
	display: block;
	width: 16px;
	height: 16px;
	stroke: currentColor;
}

.ndk-reviews .ndk-carousel-arrow:hover {
	background: #f3f4f6 !important;
	border-color: #d1d5db !important;
	color: var(--ndk-text) !important;
}

.ndk-reviews .ndk-carousel-arrow:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* JS adds .ndk-no-scroll when all cards already fit — no need for arrows. */
.ndk-reviews.ndk-no-scroll .ndk-carousel-arrow {
	display: none !important;
}

/* ============================================================
 * Badge — curved (image 1) — inside slider
 * ============================================================ */
.ndk-reviews-badge {
	flex: 0 0 200px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	text-align: center;
	background: #fff;
	border: 1px solid var(--ndk-border);
	border-radius: var(--ndk-radius);
	padding: 16px 12px 18px;
	gap: 8px;
	min-height: 170px;
	box-shadow: var(--ndk-shadow);
}

.ndk-badge-curved {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.ndk-badge-svg {
	width: 92px;
	height: 92px;
	display: block;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}

.ndk-badge-text {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	color: var(--ndk-text);
	width: 100%;
}

.ndk-badge-label {
	font-size: 13px;
	color: var(--ndk-muted);
	letter-spacing: 0.2px;
}

/* Thin divider like the real Trusted Shops card. */
.ndk-badge-sep {
	width: 78%;
	height: 1px;
	background: var(--ndk-border);
	margin: 4px 0;
}

.ndk-badge-rating {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 16px;
}

.ndk-badge-rating strong {
	font-weight: 800;
	font-size: 18px;
	color: #111827;
}

.ndk-badge-rating .ndk-star.is-on {
	color: var(--ndk-orange);
	font-size: 17px;
	line-height: 1;
}

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

.ndk-badge-verdict {
	font-size: 15px;
	color: #111827;
	font-weight: 700;
}

.ndk-badge-mini {
	margin-top: 2px;
	align-self: flex-start;
	padding-left: 10px;
}

/* ============================================================
 * Badge — simple (image 2 / 4)
 * ============================================================ */
.ndk-badge-simple {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 8px 4px;
	width: 100%;
}

.ndk-badge-stars-lg {
	font-size: 18px;
	letter-spacing: 1px;
	display: inline-flex;
	gap: 2px;
}

.ndk-badge-stars-lg .ndk-star {
	font-size: 18px;
}

.ndk-badge-stars-lg .ndk-star.is-on {
	color: var(--ndk-orange);
}

.ndk-badge-simple .ndk-badge-mini {
	margin-top: 4px;
	align-self: center;
	padding-left: 0;
}

/* ============================================================
 * Floating badge (image 3)
 * ============================================================ */
.ndk-floating-badge {
	position: fixed;
	left: 14px;
	bottom: 14px;
	width: 130px;
	background: #fff;
	border: 1px solid var(--ndk-border);
	border-radius: 14px;
	padding: 10px 8px 8px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
	text-align: center;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.ndk-floating-svg {
	width: 60px;
	height: 60px;
	display: block;
}

.ndk-floating-text {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
	font-size: 12px;
	color: var(--ndk-text);
}

.ndk-floating-label {
	font-size: 11px;
	color: var(--ndk-muted);
	letter-spacing: 0.3px;
	line-height: 1.2;
}

.ndk-floating-rating {
	display: flex;
	align-items: center;
	gap: 3px;
}

.ndk-floating-rating strong {
	font-weight: 700;
	font-size: 13px;
}

.ndk-floating-count {
	font-size: 11px;
	color: var(--ndk-muted);
}

.ndk-floating-verdict {
	font-size: 12px;
	font-weight: 700;
	color: #111827;
}

.ndk-floating-rating .ndk-star.is-on {
	color: var(--ndk-orange);
	font-size: 13px;
	line-height: 1;
}

.ndk-floating-seal {
	margin-top: 3px;
	align-self: flex-start;
	padding-left: 6px;
}

/* ============================================================
 * Badge-only mode (shortcode [ndk_reviews_badge])
 * ============================================================ */
.ndk-reviews.ndk-badge-only {
	display: flex;
	justify-content: flex-start;
}

.ndk-reviews.ndk-badge-only .ndk-badge {
	max-width: 220px;
	border: 1px solid var(--ndk-border);
	border-radius: var(--ndk-radius);
	padding: 16px 12px;
	background: #fff;
}

/* ============================================================
 * Summary (inline)
 * ============================================================ */
.ndk-summary {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	color: var(--ndk-text);
}

.ndk-summary strong { font-weight: 700; }

/* ============================================================
 * Home page wrapper
 * ============================================================ */
.ndk-home-reviews-wrap {
	max-width: var(--ndk-container-w, 1200px);
	margin: 2.5rem auto;
	padding: 0 1rem;
}

/* ============================================================
 * Responsive
 * ============================================================ */
@media (max-width: 1024px) {
	.ndk-review-card {
		flex-basis: calc(33.333% - 0.75rem);
	}
}

@media (max-width: 768px) {
	.ndk-reviews-badge {
		flex: 0 0 150px;
		padding: 12px 8px;
	}
	.ndk-review-card {
		flex-basis: calc(50% - 0.5rem);
	}
	.ndk-badge-svg {
		width: 76px;
		height: 76px;
	}
}

@media (max-width: 520px) {
	.ndk-reviews-carousel {
		flex-direction: column;
		gap: 0.75rem;
	}
	.ndk-reviews-badge {
		flex-basis: auto;
		width: 100%;
		flex-direction: row;
		justify-content: center;
		gap: 16px;
	}
	.ndk-review-card {
		flex-basis: 85%;
		min-width: 85%;
	}
	.ndk-reviews .ndk-carousel-arrow {
		display: none !important;
	}
	.ndk-floating-badge {
		width: 110px;
		padding: 6px;
	}
	.ndk-floating-svg {
		width: 48px;
		height: 48px;
	}
}

/* ============================================================
 * Full-bleed fallback (v1.4.1)
 * JS adds .ndk-fullbleed when the widget is squeezed into a
 * narrow container (< 60% of the viewport). The exact width and
 * left offset are computed in JS (inline styles) — a pure-CSS
 * 100vw/-50vw trick mis-centers when the parent itself is offset.
 * ============================================================ */
.ndk-reviews.ndk-fullbleed {
	max-width: none !important;
	min-width: 0 !important;
}
