/**
 * The reusable side panel.
 *
 * Tokens are declared here rather than borrowed from cart-summary.css, so the
 * component can be enqueued on a page that never loads the review styles.
 * Values match that file deliberately — one system, two entry points.
 */
.lumintra-panel {
	--lumintra-panel-ink: #20261f;
	--lumintra-panel-muted: #676b61;
	--lumintra-panel-line: rgba(32, 38, 31, 0.16);
	--lumintra-panel-paper: #fffaf0;
	--lumintra-panel-sage: #4a7c6f;
	--lumintra-panel-clay: #ad4e34;
	--lumintra-panel-clay-hover: #c56447;
	--lumintra-panel-danger: #8f3520;
	--lumintra-panel-width: 34rem;

	position: fixed;
	inset: 0;
	z-index: 9999;
}

.lumintra-panel[hidden] {
	display: none;
}

body.lumintra-panel-open {
	overflow: hidden;
}

.lumintra-panel__overlay {
	position: absolute;
	inset: 0;
	background: rgba(32, 38, 31, 0.42);
	opacity: 0;
	transition: opacity 200ms ease;
}

.lumintra-panel.is-open .lumintra-panel__overlay {
	opacity: 1;
}

.lumintra-panel__dialog {
	position: absolute;
	inset-block: 0;
	inset-inline-end: 0;
	display: flex;
	flex-direction: column;
	width: min(var(--lumintra-panel-width), 100%);
	background: var(--lumintra-panel-paper);
	box-shadow: -1px 0 40px rgba(32, 38, 31, 0.18);
	transform: translateX(100%);
	transition: transform 200ms ease;
}

.lumintra-panel.is-open .lumintra-panel__dialog {
	transform: translateX(0);
}

.lumintra-panel__dialog:focus {
	outline: none;
}

/* Below this width the drawer is the screen, so it stops pretending to be a panel. */
@media (max-width: 40rem) {
	.lumintra-panel__dialog {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lumintra-panel__overlay,
	.lumintra-panel__dialog {
		transition: none;
	}
}

.lumintra-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 2rem 2rem 1.25rem;
	border-bottom: 1px solid var(--lumintra-panel-line);
}

.lumintra-panel__title {
	margin: 0;
	font-size: 1.75rem;
	font-weight: 400;
	line-height: 1.15;
	color: var(--lumintra-panel-ink);
}

.lumintra-panel__intro,
.lumintra-panel__target {
	margin: 0.4rem 0 0;
	font-size: 0.86rem;
	line-height: 1.5;
	color: var(--lumintra-panel-muted);
}

.lumintra-panel__target {
	font-weight: 550;
	color: var(--lumintra-panel-sage);
}

.lumintra-panel__close {
	flex: none;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 50%;
	color: var(--lumintra-panel-ink);
	cursor: pointer;
}

.lumintra-panel .lumintra-panel__close:hover,
.lumintra-panel .lumintra-panel__close:focus {
	background: rgba(32, 38, 31, 0.06);
	color: var(--lumintra-panel-ink);
}

.lumintra-panel__close-icon {
	width: 1.15rem;
	height: 1.15rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.lumintra-panel__body {
	flex: 1;
	overflow-y: auto;
	padding: 0.5rem 2rem 1.5rem;
}

.lumintra-panel__empty {
	margin: 2rem 0;
	color: var(--lumintra-panel-muted);
}

.lumintra-panel__section {
	margin-top: 1.75rem;
}

.lumintra-panel__section-label {
	margin: 0 0 0.35rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--lumintra-panel-line);
	font-size: 0.7rem;
	font-weight: 550;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--lumintra-panel-muted);
}

.lumintra-panel__rows {
	margin: 0;
	padding: 0;
	list-style: none;
}

.lumintra-panel__row {
	display: grid;
	grid-template-columns: 4rem 1fr auto;
	align-items: center;
	gap: 1rem;
	padding: 0.9rem 0;
	border-bottom: 1px solid rgba(32, 38, 31, 0.07);
}

.lumintra-panel__row.is-disabled {
	opacity: 0.5;
}

.lumintra-panel__row-media {
	display: grid;
	place-items: center;
	overflow: hidden;
	width: 4rem;
	height: 4rem;
	border-radius: 4px;
	background: rgba(32, 38, 31, 0.06);
}

.lumintra-panel__row-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lumintra-panel__row-media-icon {
	width: 1.25rem;
	height: 1.25rem;
	fill: none;
	stroke: var(--lumintra-panel-muted);
	stroke-width: 1.4;
}

.lumintra-panel__row-body {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.lumintra-panel__row-eyebrow {
	font-size: 0.65rem;
	font-weight: 550;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--lumintra-panel-sage);
}

.lumintra-panel__row-title {
	font-size: 1.05rem;
	line-height: 1.3;
	color: var(--lumintra-panel-ink);
}

.lumintra-panel__row-note {
	font-size: 0.82rem;
	line-height: 1.45;
	color: var(--lumintra-panel-muted);
	/* Two lines keeps every row the same height without truncating mid-thought. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.lumintra-panel__row-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.25rem;
	font-size: 0.76rem;
	font-variant-numeric: tabular-nums;
	color: var(--lumintra-panel-muted);
}

.lumintra-panel__row-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.lumintra-panel__row-meta-icon {
	width: 0.85rem;
	height: 0.85rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.lumintra-panel__row-elsewhere {
	margin-top: 0.25rem;
	font-size: 0.74rem;
	color: var(--lumintra-panel-sage);
}

.lumintra-panel__row-reason {
	grid-column: 2 / -1;
	font-size: 0.74rem;
	color: var(--lumintra-panel-danger);
}

/*
 * Scoped under the panel root, and every state with it. A host theme's element
 * reset sits at (0,1,1), above a lone BEM class, so it owned whatever this file
 * left unsaid: Hello Elementor's `button:hover { background-color: #c36; color:
 * #fff }` filled these squares raspberry, a colour the panel's palette does not
 * contain. Restating the background and the colour on hover is the fix; the
 * base and :disabled rules are lifted to match so the cascade between the three
 * stays in the order it reads.
 */
.lumintra-panel .lumintra-panel__row-action {
	flex: none;
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	background: none;
	border: 1px solid var(--lumintra-panel-line);
	border-radius: 4px;
	color: var(--lumintra-panel-ink);
	cursor: pointer;
	transition: background-color 120ms ease, border-color 120ms ease;
}

/*
 * Qualified by the row's resting state rather than by the panel, so a staged or
 * present row keeps the sage fill it earned instead of being flattened back to
 * neutral the moment a cursor crosses it. Those two rules carry enough
 * specificity of their own to hold against the theme.
 */
.lumintra-panel__row:not(.is-staged):not(.is-present) .lumintra-panel__row-action:hover:not(:disabled),
.lumintra-panel__row:not(.is-staged):not(.is-present) .lumintra-panel__row-action:focus:not(:disabled) {
	background: none;
	border-color: var(--lumintra-panel-ink);
	color: var(--lumintra-panel-ink);
}

.lumintra-panel .lumintra-panel__row-action:disabled {
	cursor: default;
}

.lumintra-panel__row-action-icon {
	grid-area: 1 / 1;
	width: 1rem;
	height: 1rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* One button, two glyphs: whichever the row's state calls for. */
.lumintra-panel__row-action-icon--on {
	display: none;
}

.lumintra-panel__row.is-staged .lumintra-panel__row-action,
.lumintra-panel__row.is-present .lumintra-panel__row-action {
	background: var(--lumintra-panel-sage);
	border-color: var(--lumintra-panel-sage);
	color: #fff;
}

.lumintra-panel__row.is-staged .lumintra-panel__row-action-icon--add,
.lumintra-panel__row.is-present .lumintra-panel__row-action-icon--add {
	display: none;
}

.lumintra-panel__row.is-staged .lumintra-panel__row-action-icon--on,
.lumintra-panel__row.is-present .lumintra-panel__row-action-icon--on {
	display: block;
}

.lumintra-panel__row.is-present .lumintra-panel__row-action {
	opacity: 0.55;
}

.lumintra-panel__foot {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.1rem 2rem;
	border-top: 1px solid var(--lumintra-panel-line);
	background: var(--lumintra-panel-paper);
}

.lumintra-panel__count {
	margin: 0;
	font-size: 0.7rem;
	font-weight: 550;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--lumintra-panel-muted);
}

.lumintra-panel__status {
	flex: 1;
	margin: 0;
	font-size: 0.78rem;
	color: var(--lumintra-panel-muted);
}

.lumintra-panel__status.is-error {
	color: var(--lumintra-panel-danger);
}

.lumintra-panel__confirm {
	margin-inline-start: auto;
	padding: 0.7rem 1.5rem;
	background: var(--lumintra-panel-clay);
	border: 0;
	border-radius: 4px;
	font-size: 0.72rem;
	font-weight: 550;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #fff;
	cursor: pointer;
}

/*
 * `:focus` as well as `:focus-visible` — the theme paints the plain one, which
 * a mouse click leaves behind, and matching only the visible variant would let
 * the button sit raspberry after being pressed.
 */
.lumintra-panel .lumintra-panel__confirm:hover:not(:disabled),
.lumintra-panel .lumintra-panel__confirm:focus:not(:disabled) {
	background: var(--lumintra-panel-clay-hover);
	color: #fff;
}

.lumintra-panel .lumintra-panel__confirm:disabled {
	background: rgba(32, 38, 31, 0.12);
	color: var(--lumintra-panel-muted);
	cursor: default;
}

.lumintra-panel.is-busy .lumintra-panel__dialog {
	cursor: progress;
}

/*
 * A deferred panel: the wait and the failure that stand in for rows until a
 * search comes back. Both are server-rendered and merely revealed, so they sit
 * in the same place a row would and the body never jumps.
 */
.lumintra-panel__pending {
	margin: 2rem 0;
	color: var(--lumintra-panel-muted);
}

.lumintra-panel__pending--error {
	color: var(--lumintra-panel-danger);
}

/*
 * Choosing a stay, as opposed to collecting experiences.
 *
 * The row action becomes a circle: one of these will be true when the guest is
 * done, and a round control says that where a square one says "add another".
 * Nothing else about the row changes — a stay and an experience should still
 * look like siblings.
 */
.lumintra-panel[data-lumintra-panel-variant='choose'] .lumintra-panel__row-action {
	border-radius: 50%;
}

/*
 * The total is what a guest compares rows on, so it is stated on its own line
 * rather than folded in with the quiet details. Tabular figures keep the column
 * of prices aligned down the panel.
 */
.lumintra-panel__row-price {
	margin-top: 0.35rem;
	font-size: 0.95rem;
	font-weight: 550;
	font-variant-numeric: tabular-nums;
	color: var(--lumintra-panel-ink);
}

/* Nothing to press while the search is out. */
.lumintra-panel.is-loading .lumintra-panel__confirm {
	visibility: hidden;
}
