/**
 * Bella — Product side rail (1.9.0)
 *
 * Desktop only by design: this fills the whitespace under the gallery that only
 * exists in a two-column layout. Below the breakpoint the columns stack and the
 * space is not there, so the rail is removed from the page entirely.
 *
 * Colours come from the Bella brand variables, so each store inherits its own.
 */

.bella-rail {
	margin: 20px 0 0;
	font-family: var(--bella-font, inherit), sans-serif;
	color: var(--bella-text, #1E1E1E);
}

@media (max-width: 1024px) {
	.bella-rail {
		display: none !important;
	}
}

.bella-rail__title {
	margin: 0 0 10px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: -0.01em;
	color: var(--bella-text, #1E1E1E) !important;
	text-transform: none !important;
}

/* ------------------------------------------------------------------ tiktok */

.bella-rail__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bella-rail__cell {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bella-rail__tile {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 9 / 16;
	padding: 0;
	border: 1px solid var(--bella-border, #DBDBDB);
	border-radius: 10px;
	background-color: var(--bella-primary, #2C5633);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	cursor: pointer;
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bella-rail__tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.bella-rail__tile:focus-visible {
	outline: 3px solid var(--bella-primary, #2C5633);
	outline-offset: 3px;
}

.bella-rail__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin: -19px 0 0 -19px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	color: var(--bella-primary, #2C5633);
}

.bella-rail__label {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 18px 8px 8px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
	color: #FFFFFF;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ----------------------------------------------------------------- reviews */

.bella-rail__score {
	display: flex;
	align-items: center;
	gap: 9px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--bella-border, #DBDBDB);
}

.bella-rail__avg {
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	color: var(--bella-text, #1E1E1E);
}

.bella-rail__stars {
	color: var(--bella-primary, #2C5633);
	font-size: 14px;
	letter-spacing: 2px;
}

.bella-rail__stars--sm {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
}

.bella-rail__count {
	font-size: 12px;
	color: var(--bella-muted, #4A4A45);
}

.bella-rail__review {
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--bella-border, #DBDBDB);
}

.bella-rail__review blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	quotes: none;
}

.bella-rail__review blockquote p {
	margin: 0 0 4px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--bella-text, #1E1E1E);
}

.bella-rail__review figcaption {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 3px 8px;
	font-size: 10.5px;
	font-weight: 600;
	color: var(--bella-muted, #4A4A45);
}

/* Only shown when WooCommerce has marked the review as a verified purchase. */
.bella-rail__verified {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: #1E7A3C;
	font-weight: 700;
}

.bella-rail__date {
	font-weight: 500;
	color: var(--bella-muted, #4A4A45);
}

.bella-rail__more {
	display: block;
	margin-top: 10px;
	padding: 9px;
	border: 1.5px solid var(--bella-primary, #2C5633);
	border-radius: 8px;
	color: var(--bella-primary, #2C5633);
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}

.bella-rail__more:hover,
.bella-rail__more:focus {
	background: var(--bella-primary, #2C5633);
	color: #FFFFFF;
}

.bella-rail--empty {
	padding: 16px;
	border: 1px dashed var(--bella-border, #DBDBDB);
	border-radius: 10px;
	color: var(--bella-muted, #4A4A45);
	font-size: 12px;
	line-height: 1.5;
}

/* --------------------------------------------------------------- lightbox */

.bella-rail-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.82);
}

.bella-rail-modal__inner {
	position: relative;
	width: min(420px, 92vw);
	aspect-ratio: 9 / 16;
	max-height: 86vh;
	border-radius: 12px;
	background: #000000;
	overflow: hidden;
}

.bella-rail-modal__inner iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.bella-rail-modal__close {
	position: absolute;
	top: -46px;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	color: #FFFFFF;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.bella-rail-modal__close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.bella-rail-modal__close:focus-visible {
	outline: 3px solid #FFFFFF;
	outline-offset: 2px;
}
