/* Orbital Quote PDF: tidy product page. Loaded only on product pages with the setting on (body.oqp-tidy).
   Targets stable IDs from the product template: #apollin_product_price, #orb_custom_add_to_cart,
   #orb_custom_save_configuration and the configurator's #save-configuration-btn. */

body.oqp-tidy {
	--oqp-blue: #019cde;
	--oqp-ink: #222222;
	--oqp-muted: #5b6770;
	--oqp-card-line: #dfe5e8;
	--oqp-divider: #e3e8ea;
	--oqp-button-line: #b8c2c7;
	--oqp-secondary-ink: #1f2a30;
}

/* ===================== Price panel as one card ===================== */

body.oqp-tidy .elementor-widget-heading:has(+ #apollin_product_price),
body.oqp-tidy #apollin_product_price,
body.oqp-tidy #apollin_product_price ~ .ppcp-messages.oqp-pp-panel,
body.oqp-tidy .elementor-widget:has(#orb_custom_add_to_cart),
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration),
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list,
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget:has(.orbital_computer_details_wrapper) {
	width: 100%;
	margin: 0 !important;
	margin-block-end: 0 !important;
	padding-left: 28px !important;
	padding-right: 28px !important;
	box-sizing: border-box;
	background: #ffffff;
	border-left: 1px solid var(--oqp-card-line);
	border-right: 1px solid var(--oqp-card-line);
}

/* Top of the card: "Price as configured". */
body.oqp-tidy .elementor-widget-heading:has(+ #apollin_product_price) {
	margin-top: 24px !important;
	padding-top: 26px !important;
	border-top: 1px solid var(--oqp-card-line);
	border-radius: 6px 6px 0 0;
}
body.oqp-tidy .elementor-widget-heading:has(+ #apollin_product_price) .elementor-heading-title {
	margin: 0;
	text-align: left;
	font-size: 18px;
	font-weight: 300;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: #444444;
}

/* The price. Elementor margins or offsets set on these widgets for the old layout (a negative top margin
   pulled the price up under the heading) would make them overlap inside the card, so they are reset. */
body.oqp-tidy .elementor-widget-heading:has(+ #apollin_product_price),
body.oqp-tidy #apollin_product_price,
body.oqp-tidy .elementor-widget-heading:has(+ #apollin_product_price) > .elementor-widget-container,
body.oqp-tidy #apollin_product_price > .elementor-widget-container {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	transform: none !important;
	height: auto !important;
	min-height: 0 !important;
}
body.oqp-tidy .elementor-widget-heading:has(+ #apollin_product_price) > .elementor-widget-container,
body.oqp-tidy #apollin_product_price > .elementor-widget-container {
	margin: 0 !important;
	padding: 0 !important;
	text-align: left;
}
body.oqp-tidy .elementor-widget-heading:has(+ #apollin_product_price) .elementor-heading-title {
	margin: 0 !important;
	line-height: 1.3 !important;
}
body.oqp-tidy #apollin_product_price .price {
	position: static !important;
	top: auto !important;
	transform: none !important;
	margin: 6px 0 0 !important;
	padding: 0 !important;
	text-align: left;
	font-size: 46px !important;
	font-weight: 400;
	line-height: 1.1 !important;
	color: #000000;
}

/* PayPal monthly price, moved under the price on desktop. */
body.oqp-tidy .ppcp-messages.oqp-pp-panel { padding-top: 6px !important; }

/* Quantity + Add to cart. */
body.oqp-tidy .elementor-widget:has(#orb_custom_add_to_cart) { padding-top: 22px !important; }
body.oqp-tidy .elementor-widget:has(#orb_custom_add_to_cart) .elementor-button-wrapper {
	display: flex;
	gap: 10px;
	align-items: stretch;
	text-align: left;
}
body.oqp-tidy #orb_custom_add_to_cart {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: 52px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 4px;
	box-shadow: none;
	background: var(--oqp-blue);
	color: #ffffff;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
}
body.oqp-tidy #orb_custom_add_to_cart .elementor-button-text { color: #ffffff; }

body.oqp-tidy .oqp-qty {
	display: flex;
	align-items: center;
	flex: none;
	height: 52px;
	box-sizing: border-box;
	border: 1px solid var(--oqp-button-line);
	border-radius: 4px;
	background: #ffffff;
}
body.oqp-tidy .oqp-qty button.oqp-qty-btn {
	width: 44px;
	height: 50px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
	color: var(--oqp-ink);
	font-size: 20px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
}
body.oqp-tidy .oqp-qty button.oqp-qty-btn:hover { background: #f3f6f7; color: var(--oqp-ink); }
body.oqp-tidy .oqp-qty input {
	width: 34px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	background: transparent;
	text-align: center;
	font: inherit;
	font-size: 17px;
	color: var(--oqp-ink);
}
.oqp-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Quote + Save as a matching pair, then the price-hold note. */
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) { padding-top: 10px !important; }
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) .elementor-button-wrapper,
body.oqp-tidy .oqp-form-pair {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	text-align: left;
	justify-content: stretch !important;
}
body.oqp-tidy .oqp-sidebar-cta,
body.oqp-tidy .oqp-form-pair .oqp-product-cta { margin: 0; text-align: left; display: block; }

body.oqp-tidy button.oqp-quote-button.oqp-quote-button,
body.oqp-tidy #orb_custom_save_configuration,
body.oqp-tidy button#save-configuration-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	height: 46px;
	min-height: 46px;
	margin: 0;
	padding: 0 10px;
	border: 1px solid var(--oqp-button-line);
	border-radius: 4px;
	box-shadow: none;
	background: #ffffff;
	color: var(--oqp-secondary-ink);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
}
body.oqp-tidy #orb_custom_save_configuration .elementor-button-text { color: var(--oqp-secondary-ink); }
body.oqp-tidy button.oqp-quote-button.oqp-quote-button:hover,
body.oqp-tidy #orb_custom_save_configuration:hover,
body.oqp-tidy button#save-configuration-btn:hover {
	border-color: #7c8a91;
	background: #f6f8f9;
	color: var(--oqp-secondary-ink);
}

body.oqp-tidy .oqp-hold-note {
	grid-column: 1 / -1;
	margin: 2px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--oqp-muted);
	text-align: left;
}
body.oqp-tidy .oqp-form-pair .oqp-reset {
	grid-column: 1 / -1;
	justify-self: start;
	margin: 6px 0 0 !important;
	font-size: 14px;
	text-align: left !important;
}

/* Divider, then the info list: left-aligned, one icon column. */
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list { padding-top: 22px !important; }
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list > .elementor-widget-container {
	border-top: 1px solid var(--oqp-divider);
	padding-top: 20px;
}
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list .elementor-icon-list-items {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
}
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list .elementor-icon-list-item,
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list .elementor-icon-list-item > a {
	display: flex;
	justify-content: flex-start !important;
	align-items: flex-start;
	text-align: left;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 15px;
	line-height: 1.4;
}
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list .elementor-icon-list-item::after { display: none; }
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list .elementor-icon-list-icon {
	flex: none;
	width: 20px;
	margin-top: 2px;
	text-align: center;
}
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list .elementor-icon-list-icon i {
	font-size: 16px;
	color: var(--oqp-muted) !important;
}
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list .elementor-icon-list-text {
	padding-left: 12px !important;
	color: var(--oqp-ink) !important;
}
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list .elementor-icon-list-item > a:hover .elementor-icon-list-text { text-decoration: underline; }

/* The hours / "send a message" line sits under the phone line, without an icon. */
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list .elementor-icon-list-item:has(a[href*="contact"]) { margin-top: -10px !important; }
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list .elementor-icon-list-item:has(a[href*="contact"]) .elementor-icon-list-icon { display: none; }
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list .elementor-icon-list-item:has(a[href*="contact"]) .elementor-icon-list-text {
	padding-left: 32px !important;
	font-size: 14px;
	color: var(--oqp-muted) !important;
}

/* "Ships within 5 business days" (shortcode) as the last row, with a truck icon. Bottom of the card. */
body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget:has(.orbital_computer_details_wrapper) {
	padding-top: 14px !important;
	padding-bottom: 24px !important;
	border-bottom: 1px solid var(--oqp-card-line);
	border-radius: 0 0 6px 6px;
}
body.oqp-tidy .orbital_computer_details_wrapper,
body.oqp-tidy .orbital_computer_details { margin: 0; padding: 0; text-align: left; }
body.oqp-tidy .orbital_computer_details-item {
	position: relative;
	margin: 0;
	padding: 0 0 0 32px;
	text-align: left;
	font-size: 15px;
	line-height: 1.4;
	color: var(--oqp-ink);
	text-transform: lowercase;
}
body.oqp-tidy .orbital_computer_details-item::first-letter { text-transform: uppercase; }
body.oqp-tidy .orbital_computer_details-item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	width: 20px;
	height: 20px;
	background: no-repeat center / 18px 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6770' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='3' width='15' height='13'/%3E%3Cpolygon points='16 8 20 8 23 11 23 16 16 16 16 8'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E");
}

/* ===================== Desktop: one set of buttons ===================== */
/* Only on pages that have the price panel, so products without it keep their buttons. */
@media (min-width: 768px) {
	body.oqp-tidy:has(#orb_custom_add_to_cart) form.cart .quantity,
	body.oqp-tidy:has(#orb_custom_add_to_cart) form.cart .single_add_to_cart_button,
	body.oqp-tidy:has(#orb_custom_add_to_cart) .oqp-product-cta,
	body.oqp-tidy:has(#orb_custom_add_to_cart) #save-configuration-btn,
	body.oqp-tidy:has(#orb_custom_add_to_cart) .oqp-form-pair .oqp-hold-note,
	body.oqp-tidy:has(#orb_custom_add_to_cart) .oqp-form-price { display: none !important; }

	body.oqp-tidy .oqp-mbar { display: none !important; }
}

/* ===================== Phones ===================== */
@media (max-width: 767px) {
	/* The panel keeps its price and info list; its buttons live once at the end of the options. */
	body.oqp-tidy .elementor-widget:has(#orb_custom_add_to_cart),
	body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) { display: none !important; }
	body.oqp-tidy .elementor-widget:has(#orb_custom_save_configuration) ~ .elementor-widget-icon-list { padding-top: 18px !important; }

	/* End of the options: price, monthly price, quantity + Add to cart, quote + save, note. */
	body.oqp-tidy .oqp-form-price {
		margin: 8px 0 4px !important;
		text-align: left !important;
		font-size: 40px !important;
		font-weight: 400 !important;
		line-height: 1.1 !important;
		color: #000000 !important;
	}
	body.oqp-tidy .oqp-form-price * {
		margin: 0 !important;
		text-align: inherit !important;
		font-size: inherit !important;
		font-weight: inherit !important;
		line-height: inherit !important;
		color: inherit !important;
	}
	body.oqp-tidy form.cart .single_add_to_cart_button {
		min-height: 52px;
		border: 0;
		border-radius: 4px;
		box-shadow: none;
		background: var(--oqp-blue);
		color: #ffffff;
		font-size: 19px;
		font-weight: 700;
		letter-spacing: 0;
		text-transform: none;
	}
	body.oqp-tidy .oqp-form-pair { margin-top: 10px; }

	/* Price bar pinned to the bottom while choosing options. */
	body.oqp-tidy { padding-bottom: 84px; }
	body.oqp-tidy .oqp-mbar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		box-sizing: border-box;
		padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
		background: #ffffff;
		border-top: 1px solid var(--oqp-card-line);
		transition: transform .2s ease;
	}
	body.oqp-tidy .oqp-mbar--away { transform: translateY(110%); }
	body.oqp-tidy .oqp-mbar-price {
		font-size: 22px;
		font-weight: 500;
		color: #000000;
		white-space: nowrap;
	}
	body.oqp-tidy .oqp-mbar button.oqp-mbar-add {
		flex: none;
		height: 50px;
		margin: 0;
		padding: 0 26px;
		border: 0;
		border-radius: 4px;
		box-shadow: none;
		background: var(--oqp-blue);
		color: #ffffff;
		font-size: 19px;
		font-weight: 700;
		letter-spacing: 0;
		text-transform: none;
		cursor: pointer;
	}
}
@media (prefers-reduced-motion: reduce) { body.oqp-tidy .oqp-mbar { transition: none; } }
.oqp-mbar { display: none; }
@media (max-width: 767px) { body.oqp-tidy .oqp-mbar { display: flex; } }
