/* ==========================================================================
   Brightspot Display Styles
   ========================================================================== */

/* ---------- Shared Card Styles ---------- */
.brightspot-card {
	background: var(--bs-card-bg, #fff);
	color: var(--bs-text-color, inherit);
	border: var(--bs-border-width, 1px) solid var(--bs-border-color, #e5e7eb);
	border-radius: var(--bs-border-radius, 12px);
	padding: var(--bs-padding, 24px);
	box-shadow: var(--bs-shadow, none);
	box-sizing: border-box;
	/* Flex column + gap so spacing stays consistent regardless of element order. */
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.brightspot-card-video {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	cursor: pointer;
}

/* When the video is the first child, bleed it to the card edges. */
.brightspot-card-video:first-child {
	margin: calc(var(--bs-padding, 24px) * -1) calc(var(--bs-padding, 24px) * -1) 0;
	border-radius: var(--bs-border-radius, 12px) var(--bs-border-radius, 12px) 0 0;
}

.brightspot-card-video-thumb {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.brightspot-card-video-play {
	position: absolute;
	bottom: 12px;
	right: 12px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
	pointer-events: none;
}

.brightspot-card-video:hover .brightspot-card-video-play {
	background: rgba(0, 0, 0, 0.8);
	transform: scale(1.1);
}

.brightspot-card-video.is-playing {
	cursor: default;
}

.brightspot-card-video.is-playing .brightspot-card-video-play,
.brightspot-card-video.is-playing .brightspot-card-video-thumb {
	display: none;
}

.brightspot-card-video video.brightspot-card-video-player {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.brightspot-card-stars {
	line-height: 1;
}

.brightspot-star {
	display: inline-block;
	vertical-align: middle;
}

.brightspot-star-filled {
	color: var(--bs-star-color, #f59e0b);
}

.brightspot-star-empty {
	color: #d1d5db;
}

.brightspot-card-text {
	font-size: var(--bs-font-size, 15px);
	line-height: 1.6;
	color: inherit;
}

/* Normalize <p> margins inside testimonial text so layout looks the same
   whether the source content is plain text or wrapped in <p> tags. */
.brightspot-card-text p,
.brightspot-rotating-quote-text p,
.brightspot-text-full p,
.brightspot-text-short p {
	margin: 0;
}

.brightspot-card-text p + p,
.brightspot-rotating-quote-text p + p,
.brightspot-text-full p + p {
	margin-top: 0.75em;
}

mark.brightspot-featured {
	background: var(--brightspot-highlight-color, #fef3c7);
	color: inherit;
	padding: 1px 3px;
	border-radius: 2px;
}

.brightspot-text-toggle {
	background: none;
	border: none;
	padding: 0;
	margin-left: 4px;
	color: #6366f1;
	font: inherit;
	cursor: pointer;
	text-decoration: underline;
}

.brightspot-text-toggle:hover {
	color: #4f46e5;
}

/* ---------- Inspector controls (editor only) ---------- */
.brightspot-order-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.brightspot-order-item {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 8px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	cursor: grab;
}

.brightspot-order-item:active {
	cursor: grabbing;
}

.brightspot-order-handle {
	color: #9ca3af;
	font-weight: 700;
	letter-spacing: -2px;
	cursor: grab;
}

.brightspot-order-label {
	flex: 1;
	font-size: 13px;
}

.brightspot-order-btn {
	background: transparent;
	border: 1px solid #e5e7eb;
	border-radius: 3px;
	padding: 2px 6px;
	font-size: 12px;
	cursor: pointer;
	line-height: 1;
}

.brightspot-order-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.brightspot-carousel-slide-content .brightspot-text-toggle {
	color: #fff;
	text-decoration-color: rgba(255, 255, 255, 0.6);
}

.brightspot-card-attribution {
	display: flex;
	align-items: center;
	gap: 12px;
}

.brightspot-card-avatar {
	width: var(--bs-image-size, 40px);
	height: var(--bs-image-size, 40px);
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.brightspot-card-avatar-initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--bs-image-size, 40px);
	height: var(--bs-image-size, 40px);
	border-radius: 50%;
	background: #6366f1;
	color: #fff;
	font-weight: 600;
	font-size: 16px;
	flex-shrink: 0;
}

.brightspot-card-meta {
	display: flex;
	flex-direction: column;
}

.brightspot-card-name {
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
}

.brightspot-card-title {
	font-size: 13px;
	color: #6b7280;
	line-height: 1.3;
}

.brightspot-card-location {
	display: block;
	font-size: 12px;
	color: #9ca3af;
	line-height: 1.3;
}


/* ---------- 1. Marquee ---------- */
.brightspot-marquee {
	overflow: hidden;
	position: relative;
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
}

.brightspot-marquee.is-dragging {
	cursor: grabbing;
}

.brightspot-marquee-track {
	display: flex;
	gap: 20px;
	width: max-content;
	animation: brightspot-marquee-scroll var(--marquee-speed, 30s) linear infinite;
}

.brightspot-marquee.is-paused .brightspot-marquee-track,
.brightspot-marquee.is-video-playing .brightspot-marquee-track {
	animation-play-state: paused;
}

.brightspot-marquee .brightspot-card {
	flex-shrink: 0;
	width: 350px;
}

@keyframes brightspot-marquee-scroll {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

@media (max-width: 640px) {
	.brightspot-marquee .brightspot-card {
		width: 280px;
	}
}


/* ---------- 2. Masonry ---------- */
.brightspot-masonry {
	column-count: var(--masonry-columns, 3);
	column-gap: var(--masonry-gap, 20px);
}

.brightspot-masonry .brightspot-card {
	break-inside: avoid;
	margin-bottom: var(--masonry-gap, 20px);
}

@media (max-width: 900px) {
	.brightspot-masonry {
		column-count: 2;
	}
}

@media (max-width: 600px) {
	.brightspot-masonry {
		column-count: 1;
	}
}


/* ---------- 3. Carousel ---------- */
.brightspot-carousel {
	position: relative;
	overflow: hidden;
}

.brightspot-carousel-viewport {
	overflow: hidden;
}

.brightspot-carousel-track {
	display: flex;
	transition: transform 0.5s ease;
}

.brightspot-carousel-slide {
	flex-shrink: 0;
	width: 100%;
	position: relative;
	min-height: 300px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 40px;
	box-sizing: border-box;
}

.brightspot-carousel-slide-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	z-index: 0;
}

.brightspot-carousel-slide-bg::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.brightspot-carousel-slide-content {
	position: relative;
	z-index: 1;
	text-align: center;
	max-width: 700px;
	color: var(--bs-text-color, #fff);
	padding: var(--bs-padding, 0);
	border: var(--bs-border-width, 0) solid var(--bs-border-color, transparent);
	border-radius: var(--bs-border-radius, 0);
	box-shadow: var(--bs-shadow, none);
	display: flex;
	flex-direction: column;
	gap: 20px;
	align-items: center;
}

.brightspot-carousel-slide-content .brightspot-card-text {
	font-size: var(--bs-font-size, 22px);
	line-height: 1.5;
	color: var(--bs-text-color, #fff);
}

.brightspot-carousel-slide-content .brightspot-card-attribution {
	justify-content: center;
}

.brightspot-carousel-slide-content .brightspot-card-name {
	color: #fff;
}

.brightspot-carousel-slide-content .brightspot-card-title {
	color: rgba(255, 255, 255, 0.8);
}

.brightspot-carousel-slide-content .brightspot-card-location {
	color: rgba(255, 255, 255, 0.6);
}

.brightspot-carousel-slide-content .brightspot-star-filled {
	color: var(--bs-star-color, #fbbf24);
}

.brightspot-carousel-slide-content .brightspot-star-empty {
	color: rgba(255, 255, 255, 0.4);
}

.brightspot-carousel-slide-content mark.brightspot-featured {
	background: var(--brightspot-highlight-color, rgba(251, 191, 36, 0.35));
	color: #fff;
}

.brightspot-carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 20px;
	color: #333;
	transition: background 0.2s;
}

.brightspot-carousel-btn:hover {
	background: #fff;
}

.brightspot-carousel-prev {
	left: 16px;
}

.brightspot-carousel-next {
	right: 16px;
}

.brightspot-carousel-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding: 16px 0;
}

.brightspot-carousel-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #d1d5db;
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s;
}

.brightspot-carousel-dot.is-active {
	background: #6366f1;
}


/* ---------- 4. Wall of Love ---------- */
.brightspot-wall {
	display: grid;
	grid-template-columns: repeat(var(--wall-columns, 4), minmax(0, 1fr));
	gap: var(--wall-gap, 16px);
}

@media (max-width: 900px) {
	.brightspot-wall {
		grid-template-columns: repeat(min(var(--wall-columns, 4), 2), minmax(0, 1fr));
	}
}

@media (max-width: 540px) {
	.brightspot-wall {
		grid-template-columns: 1fr;
	}
}

.brightspot-wall .brightspot-card {
	transition: box-shadow 0.2s ease;
}

.brightspot-wall .brightspot-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brightspot-wall-load-more {
	grid-column: 1 / -1;
	text-align: center;
	padding: 20px 0;
}

.brightspot-wall-load-more button {
	background: #6366f1;
	color: #fff;
	border: none;
	padding: 10px 24px;
	border-radius: 8px;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.2s;
}

.brightspot-wall-load-more button:hover {
	background: #4f46e5;
}


/* ---------- 4b. Highlights ---------- */
.brightspot-highlights {
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow: hidden;
}

.brightspot-highlights-row {
	display: flex;
	overflow: hidden;
}

.brightspot-highlights-track {
	display: flex;
	gap: 12px;
	width: max-content;
	animation: brightspot-highlights-ltr var(--row-speed, 60s) linear infinite;
	will-change: transform;
}

.brightspot-highlights-row[data-direction="rtl"] .brightspot-highlights-track {
	animation-name: brightspot-highlights-rtl;
}

.brightspot-highlights.is-paused .brightspot-highlights-track {
	animation-play-state: paused;
}

.brightspot-highlights-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: var(--bs-padding, 8px 18px);
	background: var(--bs-card-bg, #fff);
	border: var(--bs-border-width, 1px) solid var(--bs-border-color, #e5e7eb);
	border-radius: var(--bs-border-radius, 999px);
	box-shadow: var(--bs-shadow, none);
	flex-shrink: 0;
	white-space: nowrap;
	font-size: var(--bs-font-size, 15px);
	color: var(--bs-text-color, #111827);
}

.brightspot-highlights-chip-avatar {
	width: var(--bs-image-size, 28px);
	height: var(--bs-image-size, 28px);
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.brightspot-highlights-chip-initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #6366f1;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
}

.brightspot-highlights-chip-text {
	font-weight: 500;
}

.brightspot-highlights-chip-quote {
	color: #9ca3af;
	flex-shrink: 0;
}

@keyframes brightspot-highlights-ltr {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

@keyframes brightspot-highlights-rtl {
	0%   { transform: translateX(-50%); }
	100% { transform: translateX(0); }
}


/* ---------- 5. Toast ---------- */
.brightspot-toast {
	position: fixed;
	z-index: 99999;
	bottom: 20px;
	max-width: 350px;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.4s ease, transform 0.4s ease;
	pointer-events: none;
}

.brightspot-toast.is-left {
	left: 20px;
}

.brightspot-toast.is-right {
	right: 20px;
}

.brightspot-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.brightspot-toast .brightspot-card {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	position: relative;
}

.brightspot-toast .brightspot-card-text {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14px;
}

.brightspot-toast-close {
	position: absolute;
	top: 8px;
	right: 8px;
	background: none;
	border: none;
	font-size: 18px;
	cursor: pointer;
	color: #9ca3af;
	line-height: 1;
	padding: 4px;
}

.brightspot-toast-close:hover {
	color: #374151;
}


/* ---------- 6. Rating Badge ---------- */
.brightspot-rating-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--bs-card-bg, #fff);
	color: var(--bs-text-color, inherit);
	border: var(--bs-border-width, 1px) solid var(--bs-border-color, #e5e7eb);
	border-radius: var(--bs-border-radius, 8px);
	padding: var(--bs-padding, 10px 16px);
	box-shadow: var(--bs-shadow, none);
	font-size: var(--bs-font-size, 14px);
}

.brightspot-rating-badge-number {
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}

.brightspot-rating-badge-details {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.brightspot-rating-badge-label {
	color: #6b7280;
	font-size: 12px;
}


/* ---------- 7. Rotating Quotes ---------- */
.brightspot-rotating-quotes {
	display: grid;
	text-align: center;
	color: var(--bs-text-color, inherit);
	background: var(--bs-card-bg, transparent);
	padding: var(--bs-padding, 0);
	border: var(--bs-border-width, 0) solid var(--bs-border-color, transparent);
	border-radius: var(--bs-border-radius, 0);
	box-shadow: var(--bs-shadow, none);
}

.brightspot-rotating-quote {
	/* Stack every slide in the same grid cell so the container sizes to the
	   tallest one and inactive slides don't push siblings around. */
	grid-area: 1 / 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease, visibility 0s linear 0.6s;
	pointer-events: none;
}

.brightspot-rotating-quote.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.6s ease, visibility 0s linear 0s;
}

.brightspot-rotating-quote-text {
	font-size: var(--bs-font-size, 20px);
	font-style: italic;
	line-height: 1.5;
	max-width: 600px;
	margin: 0;
	position: relative;
}

.brightspot-rotating-quote-text::before {
	content: '\201C';
	font-size: 48px;
	color: #d1d5db;
	position: absolute;
	top: -20px;
	left: -24px;
	line-height: 1;
}

.brightspot-rotating-quote-attribution {
	font-size: 14px;
	color: #6b7280;
}

.brightspot-rotating-quote-attribution strong {
	color: #111827;
}


/* ---------- 7b. Highlight Rotator ---------- */
.brightspot-highlight-rotator {
	display: grid;
	background: var(--bs-card-bg, transparent);
	color: var(--bs-text-color, inherit);
	padding: var(--bs-padding, 0);
	border: var(--bs-border-width, 0) solid var(--bs-border-color, transparent);
	border-radius: var(--bs-border-radius, 0);
	box-shadow: var(--bs-shadow, none);
}

.brightspot-highlight-rotator-slide {
	/* Stack every slide in the same grid cell so the container sizes to the
	   tallest one. */
	grid-area: 1 / 1;
	display: flex;
	align-items: center;
	gap: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease, visibility 0s linear 0.6s;
	pointer-events: none;
}

.brightspot-highlight-rotator-slide.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.6s ease, visibility 0s linear 0s;
}

.brightspot-highlight-rotator-avatar {
	width: var(--bs-image-size, 56px);
	height: var(--bs-image-size, 56px);
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.brightspot-highlight-rotator-avatar-initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #6366f1;
	color: #fff;
	font-size: 22px;
	font-weight: 600;
}

.brightspot-highlight-rotator-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.brightspot-highlight-rotator-stars {
	line-height: 1;
}

.brightspot-highlight-rotator-text {
	margin: 0;
	font-size: var(--bs-font-size, 20px);
	line-height: 1.4;
	color: var(--bs-text-color, #6b7280);
}

.brightspot-highlight-rotator-quote {
	color: inherit;
}

.brightspot-highlight-rotator-name {
	margin-left: 8px;
	font-style: italic;
	color: inherit;
}

@media (max-width: 540px) {
	.brightspot-highlight-rotator-text {
		font-size: 17px;
	}

	.brightspot-highlight-rotator-avatar {
		width: 44px;
		height: 44px;
	}
}


/* ---------- 8. Avatar Strip ---------- */
.brightspot-avatar-strip {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: var(--bs-card-bg, transparent);
	color: var(--bs-text-color, inherit);
	padding: var(--bs-padding, 0);
	border: var(--bs-border-width, 0) solid var(--bs-border-color, transparent);
	border-radius: var(--bs-border-radius, 0);
	box-shadow: var(--bs-shadow, none);
}

.brightspot-avatar-strip-images {
	display: flex;
}

.brightspot-avatar-strip-images img,
.brightspot-avatar-strip-images .brightspot-avatar-overflow {
	width: var(--bs-image-size, 36px);
	height: var(--bs-image-size, 36px);
	border-radius: 50%;
	border: 3px solid var(--bs-border-color, #fff);
	object-fit: cover;
	margin-left: -10px;
}

.brightspot-avatar-strip-images img:first-child,
.brightspot-avatar-strip-images .brightspot-avatar-overflow:first-child {
	margin-left: 0;
}

.brightspot-avatar-overflow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #e5e7eb;
	color: #6b7280;
	font-size: 11px;
	font-weight: 600;
}

.brightspot-avatar-strip-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.brightspot-avatar-strip-label {
	font-size: 13px;
	color: #6b7280;
}
