/* ============================================================
   Lighting Listing — Grid
   ============================================================ */

.lighting-listing__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--wp--preset--spacing--gap-sm);
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (max-width: 1024px) {
	.lighting-listing__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.lighting-listing__grid {
		grid-template-columns: repeat(1, 1fr);
	}
}

.lighting-listing__item {
	margin: 0;
	padding: 0;
}

.lighting-listing__item--hidden {
    display: none;
}

.lighting-listing__card {
	position: relative;
	overflow: hidden;
}

.lighting-listing .lighting-modal-trigger,
.lighting-listing .lighting-modal-trigger:hover,
.lighting-listing .lighting-modal-trigger:focus,
.lighting-listing .lighting-modal-trigger:active {
	position: absolute;
	inset: 0;
	background: none;
	border: none;
	border-radius: 0;
	padding: 0;
	cursor: pointer;
	box-shadow: none;
	color: inherit;
}

.lighting-listing__image {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.lighting-listing__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lighting-listing__card-body {
	padding: 16px;
}

.lighting-listing__card-title {
	margin: 0 0 8px;
}

.lighting-listing__card-desc {
	margin: 0;
	font-weight: normal;
}

/* ============================================================
   Lighting Modal
   ============================================================ */

.lighting-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999999;
	align-items: center;
	justify-content: center;
}

.lighting-modal[aria-hidden="false"] {
	display: flex;
}

.lighting-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
}

.lighting-modal__content {
	position: relative;
	background: var(--global-palette9);
	width: 90%;
	max-width: 1200px;
	max-height: 90vh;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

.lighting-modal__close,
.lighting-modal__close:hover,
.lighting-modal__close:focus {
	position: sticky;
	top: 0;
	left: 100%;
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	align-self: flex-end;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='20' viewBox='0 0 21 20' fill='none'%3E%3Cpath d='M10.4688 1.875C7.53906 1.875 4.88281 3.4375 3.39844 5.9375C1.95312 8.47656 1.95312 11.5625 3.39844 14.0625C4.88281 16.6016 7.53906 18.125 10.4688 18.125C13.3594 18.125 16.0156 16.6016 17.5 14.0625C18.9453 11.5625 18.9453 8.47656 17.5 5.9375C16.0156 3.4375 13.3594 1.875 10.4688 1.875ZM10.4688 20C6.875 20 3.59375 18.125 1.79688 15C0 11.9141 0 8.125 1.79688 5C3.59375 1.91406 6.875 0 10.4688 0C14.0234 0 17.3047 1.91406 19.1016 5C20.8984 8.125 20.8984 11.9141 19.1016 15C17.3047 18.125 14.0234 20 10.4688 20ZM14.2578 7.5L13.5938 8.16406L11.7578 10L13.5938 11.8359L14.2578 12.5L12.9688 13.8281L12.3047 13.1641L10.4688 11.3281L8.63281 13.1641L7.96875 13.8281L6.64062 12.5L7.30469 11.8359L9.14062 10L7.30469 8.16406L6.64062 7.5L7.96875 6.21094L8.63281 6.875L10.4688 8.71094L12.3047 6.875L12.9688 6.21094L14.2578 7.5Z' fill='%23254749'/%3E%3C/svg%3E");
	background-position: center;
	background-repeat: no-repeat;
	background-size: 20px;
	background-color: transparent;
	border: none;
	box-shadow: none;
	color: transparent;
	cursor: pointer;
	z-index: 1;
}

/* Header: title + description */

.lighting-modal__header {
	padding: 0 var(--wp--preset--spacing--md) var(--wp--preset--spacing--sm);
	border-bottom: 1px solid #e0e0e0;
}

.lighting-modal__title {
	margin: 0;
	text-align: left;
}

.lighting-modal__description {
	text-align: left;
}

/* Resources list */
.lighting-modal__resources-list {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.lighting-modal__resource-btn {
	display: flex;
	align-items: center;
	gap: 0.5em;
	border: 2px solid #2d3a3e;
	background: #fff;
	color: #2d3a3e;
	font-size: 1rem;
    justify-content: center;
}
.lighting-modal__resource-btn:hover,
.lighting-modal__resource-btn:focus {
	background: #2d3a3e;
	color: #fff;
    box-shadow: none;
}

/* Posts list */

.lighting-modal__posts {
	padding: var(--wp--preset--spacing--md) var(--wp--preset--spacing--md);
}

.lighting-modal__loading {
	margin: 0;
}

/* Individual lighting post card */

.lighting-post-card {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--gap-lg);

}

.lighting-post-card:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: var(--wp--preset--spacing--md);
}

.lighting-post-card + .lighting-post-card {
	margin-top: var(--wp--preset--spacing--md);
}

/* Variations grid (left) */

.lighting-post-card__left {
	flex: 0 0 66%;
}

.lighting-post-card__left--full {
    flex: 0 0 100%;
}

.lighting-post-card__title {
	margin: 0 0 16px;
}

.lighting-variations-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.lighting-variation__image {
	margin-bottom: 8px;
}

.lighting-variation__image img {
	display: block;
	width: 100%;
	height: auto;
}

.lighting-variation__name {
	margin: 0 auto 10px;
    text-align: center;
    font-weight: 600;
    line-height: 1.2;
}

.lighting-variation__subtitle {
	margin: 0;
    text-align: center;
}

/* Product info (right) */

.lighting-post-card__right {
	flex: 0 0 33%;
	padding-top: var(--wp--preset--spacing--lg);
}

.lighting-post-card__right_inner {
    background-color: var(--global-palette8, #F7FAFC);
    padding: var(--wp--preset--spacing--sm);
}

.lighting-product-info,
.lighting-compatible-products {
    margin-bottom: 0;
    list-style-type: square;
}

.lighting-compatible-products ul {
    margin-bottom: 0;
    list-style-type: '- ';
}

.lighting-product-info__value {
	margin: 0;
}

@media screen and (min-width: 768px) {
	.lighting-post-card {
		flex-direction: row;
	}

    .lighting-post-card__left--full .lighting-variations-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .lighting-post-card__right {
        padding-right: var(--wp--preset--spacing--md);
    }
}

@media (max-width: 767px) {

	.lighting-variations-grid {
		grid-template-columns: repeat(2, 1fr);
	}

    .lighting-modal__resource-btn {
        width: 100%;
        font-size: 0.875rem;
    }
}
