/* LatePoint Cross-Upsell — Frontend styles
   Reuses LatePoint booking-form classes; styles only plugin-specific elements. */

.latepoint-cart-upsell-panel {
	margin: 16px 0;
	padding: 12px;
	border: 1px solid var(--latepoint-border-color, #e5e7eb);
	border-radius: 10px;
	background: var(--latepoint-bg-soft, #fafafa);
}

.latepoint-cart-upsell-panel-heading {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	margin-bottom: 10px;
	font-size: 13px;
}

.latepoint-cart-upsell-panel-items {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.latepoint-cart-upsell-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px;
	background: #ffffff;
	border: 1px solid var(--latepoint-border-color, #e5e7eb);
	border-radius: 8px;
	min-width: 0;
}

.latepoint-cart-upsell-item-row {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.latepoint-cart-upsell-item-thumb {
	width: 36px;
	height: 36px;
	object-fit: cover;
	border-radius: 6px;
	flex-shrink: 0;
	background: #f3f4f6;
}

.latepoint-cart-upsell-item-info {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

.latepoint-cart-upsell-item-name {
	font-weight: 600;
	color: var(--latepoint-text-color, #111827);
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.latepoint-cart-upsell-item-meta {
	font-size: 11px;
	color: #6b7280;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 2px;
}

.latepoint-cart-upsell-attached-badge {
	background: #eff6ff;
	color: #1d4ed8;
	border-radius: 999px;
	padding: 1px 6px;
	font-weight: 600;
	font-size: 10px;
}

.latepoint-cart-upsell-item-price {
	font-weight: 700;
	font-size: 13px;
	white-space: nowrap;
	flex-shrink: 0;
	color: var(--latepoint-text-color, #111827);
}

.latepoint-cart-upsell-remove-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 100%;
	padding: 6px 8px;
	background: transparent;
	border: 1px solid #fecaca;
	color: #b91c1c;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 120ms ease, border-color 120ms ease;
}

.latepoint-cart-upsell-remove-btn:hover {
	background: #fef2f2;
	border-color: #f87171;
}

.latepoint-cart-upsell-remove-btn .latepoint-icon {
	font-size: 14px;
}

.latepoint-summary-row-upsell {
	margin-top: 12px;
}

.latepoint-summary-row-upsell .latepoint-summary-row-heading {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	margin-bottom: 6px;
}

.latepoint-summary-row-items {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.latepoint-summary-row-item {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 2px 0;
}

.latepoint-summary-row-qty {
	color: #6b7280;
	font-weight: 400;
}

/* ─────────────────────────────────────────────────────────────
   Offer panel — appears on customer + verify steps.
   Compact 2-column tiles with clean two-state UI:
   Not in cart → qty + Add
   In cart     → green badge + Remove (+ small Add one more)
   ───────────────────────────────────────────────────────────── */

.latepoint-upsell-offers-w {
	margin: 20px 0;
	padding: 14px;
	border: 1px solid var(--latepoint-border-color, #e5e7eb);
	border-radius: 12px;
	background: #fff;
}

.latepoint-upsell-offers-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 12px;
	color: var(--latepoint-text-color, #111827);
}

.latepoint-upsell-offers-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

@media (max-width: 480px) {
	.latepoint-upsell-offers-grid {
		grid-template-columns: 1fr;
	}
}

.lpu-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 10px;
	background: #fff;
	border: 1px solid var(--latepoint-border-color, #e5e7eb);
	border-radius: 10px;
	min-width: 0;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}

.lpu-card.is-in-cart {
	border-color: #10b981;
	background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 35%);
}

.lpu-card.is-oos {
	opacity: 0.55;
}

.lpu-card-head {
	display: grid;
	grid-template-columns: 48px 1fr;
	gap: 10px;
	align-items: flex-start;
	min-width: 0;
}

.lpu-card-thumb {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 8px;
	background: #f3f4f6;
	flex-shrink: 0;
}

.lpu-card-title {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.lpu-card-name {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	font-size: 13px;
	line-height: 1.25;
	color: var(--latepoint-text-color, #111827);
	min-width: 0;
}

.lpu-card-name > :first-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lpu-card-incart-pill {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	background: #10b981;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 999px;
	letter-spacing: 0.02em;
}

.lpu-card-price {
	font-weight: 700;
	font-size: 13px;
	color: var(--latepoint-text-color, #111827);
}

.lpu-card-desc {
	font-size: 11px;
	color: #6b7280;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.lpu-card-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 6px;
}

.lpu-card-qty,
.lpu-card-attach {
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: 10px;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	min-width: 0;
}

.lpu-card-qty input {
	width: 52px;
	padding: 5px 6px;
	border: 1px solid var(--latepoint-border-color, #e5e7eb);
	border-radius: 6px;
	font-size: 13px;
	color: inherit;
	background: #fff;
}

.lpu-card-attach select {
	padding: 5px 6px;
	border: 1px solid var(--latepoint-border-color, #e5e7eb);
	border-radius: 6px;
	font-size: 12px;
	color: inherit;
	background: #fff;
	max-width: 100%;
}

.lpu-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 6px 10px;
	border-radius: 8px;
	border: 1px solid transparent;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
	min-height: 32px;
}

.lpu-btn .latepoint-icon {
	font-size: 13px;
}

.lpu-btn-primary {
	background: var(--latepoint-primary, #1d7bff);
	color: #fff;
	margin-left: auto;
}

.lpu-btn-primary:hover {
	background: #1664d4;
}

.lpu-btn-secondary {
	background: #fff;
	color: var(--latepoint-text-color, #111827);
	border-color: var(--latepoint-border-color, #d1d5db);
}

.lpu-btn-secondary:hover {
	border-color: #1d7bff;
	color: #1d7bff;
}

.lpu-btn-danger {
	background: #fff;
	color: #b91c1c;
	border-color: #fca5a5;
}

.lpu-btn-danger:hover {
	background: #fef2f2;
	border-color: #f87171;
}

.lpu-btn.os-loading {
	opacity: 0.6;
	pointer-events: none;
}

.lpu-card-oos {
	font-size: 12px;
	color: #b91c1c;
	font-weight: 600;
	text-align: center;
	padding: 4px;
	background: #fef2f2;
	border-radius: 6px;
}

/* Loading state still applies to old class names if any view hasn't been updated. */
.js-upsell-add.os-loading,
.js-upsell-remove.os-loading,
.js-upsell-remove-all.os-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────
   Offer-panel sections — services ("Other experiences") and
   products ("Add-ons") are grouped separately within one panel.
   ───────────────────────────────────────────────────────────── */

.latepoint-upsell-offers-w .lpu-section + .lpu-section {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px dashed var(--latepoint-border-color, #e5e7eb);
}

.lpu-section-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #6b7280;
	margin-bottom: 10px;
}

/* Recommended-service cards: single full-width call-to-action. */
.lpu-card-service .lpu-card-actions {
	justify-content: stretch;
}

.lpu-card-service .lpu-card-actions .lpu-btn-primary {
	margin-left: 0;
	width: 100%;
}

/* ─────────────────────────────────────────────────────────────
   Summary links — "useful links" section on the booking summary
   page. Each link is a full-width card (image, title, description)
   that opens in a new tab.
   ───────────────────────────────────────────────────────────── */

.latepoint-summary-links-w {
	margin: 20px 0;
}

/* Force white text for the whole section on the booking form. Per-element overrides
   below (a heading color set in settings, the card title/description, the button
   colors) still win, because an ancestor's !important is not inherited over a
   descendant's own color declaration. */
.latepoint-w .latepoint-booking-form-element .latepoint-step-content .latepoint-summary-links-w {
	color: #ffffff !important;
}

.latepoint-summary-links-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: var(--lpu-heading-size, 14px);
	margin-bottom: 12px;
	/* When a heading color is set in settings it wins; otherwise inherit the section
	   color above so a site/theme rule on .latepoint-summary-links-w reaches the heading. */
	color: var(--lpu-heading-color, inherit);
}

.latepoint-summary-links-heading span {
	font-weight: var(--lpu-heading-weight, 600);
	text-transform: var(--lpu-heading-transform, none);
	text-decoration: var(--lpu-heading-decoration, none);
	letter-spacing: var(--lpu-heading-spacing, normal);
}

.latepoint-summary-links-heading i {
	font-size: 1.1em;
}

.latepoint-summary-links-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.latepoint-summary-link-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	background: var(--lpu-card-bg, #fff);
	border: var(--lpu-card-border-width, 1px) solid var(--lpu-card-border-color, #e5e7eb);
	border-radius: var(--lpu-card-radius, 10px);
	text-decoration: none;
	color: inherit;
	transition: box-shadow 120ms ease, transform 120ms ease;
}

.latepoint-summary-link-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
	transform: translateY(-1px);
}

.latepoint-summary-link-main {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
}

.latepoint-summary-link-thumb {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
	border-radius: 8px;
	overflow: hidden;
	background: #f3f4f6;
}

.latepoint-summary-link-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.latepoint-summary-link-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.latepoint-summary-link-title {
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
	color: var(--latepoint-text-color, #111827);
}

.latepoint-summary-link-desc {
	font-size: 12px;
	line-height: 1.45;
	color: #6b7280;
}

.latepoint-summary-link-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	font-weight: 600;
	font-size: 13px;
	line-height: 1.2;
	color: var(--lpu-btn-text, #fff);
	background: var(--lpu-btn-bg, #1d7bff);
	border-radius: var(--lpu-btn-radius, 8px);
	transition: filter 120ms ease;
}

.latepoint-summary-link-card:hover .latepoint-summary-link-btn {
	filter: brightness(0.95);
}

.latepoint-summary-link-btn i {
	font-size: 14px;
	line-height: 1;
}
