/* Compact layout for the sticky listing header on phones. */
.zdt-sticky-layout-spacer {
	height: 0;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	pointer-events: none;
}

@media (max-width: 768px) {
	/* Keep only the original bookmark button below the gallery. */
	body .add-review-button-custom,
	body .add-review-button-custom .add-review-btn {
		display: flex !important;
	}

	body .add-review-button-custom > :not(.add-review-btn),
	body .add-review-button-custom .add-review-btn > :not(.drts-display-element-group-104),
	body .add-review-button-custom .drts-display-element-group-104 > :not(.drts-display-element-button-24) {
		display: none !important;
	}

	body .add-review-button-custom .drts-display-element-button-24 {
		display: inline-block !important;
	}

	body.sticky-wrapper .page-header.stuck {
		padding-right: 42px;
	}

	body.sticky-wrapper .page-header.stuck .entry-title,
	body.sticky-wrapper .page-header.stuck h1 {
		overflow: hidden;
		margin: 0;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	body.sticky-wrapper .directory-listing-info.stuck {
		padding: 6px 10px 8px;
		box-shadow: 0 2px 5px rgb(16 24 40 / 10%);
	}

	body.sticky-wrapper .directory-listing-info.stuck > [data-name="columns"] {
		margin-bottom: 0;
		padding-bottom: 0;
		border-bottom: 0;
	}

	/* The location is useful in the full header, but needlessly tall when sticky. */
	body.sticky-wrapper .directory-listing-info.stuck .drts-display-element-column-5 {
		display: none !important;
	}

	body.sticky-wrapper .directory-listing-info.stuck .contacts-block-right-side-col {
		width: 100%;
		padding: 0;
	}

	body.sticky-wrapper .directory-listing-info.stuck .contacts-block-right-side-wrap {
		display: flex !important;
		align-items: center;
		justify-content: flex-start;
		flex-wrap: nowrap;
		gap: 8px;
		width: 100%;
	}

	/* Desktop/edit/contact controls are replaced by the compact mobile actions. */
	body.sticky-wrapper .directory-listing-info.stuck .contacts-block-right-side-wrap > .drts-display-group-element-separator,
	body.sticky-wrapper .directory-listing-info.stuck .add-review-btn-mobile > .drts-display-element-button-23,
	body.sticky-wrapper .directory-listing-info.stuck .add-review-btn-mobile > .drts-display-group-element-separator {
		display: none !important;
	}

	/* The review CTA is nested inside this group, so keep the parent boxless. */
	body.sticky-wrapper .directory-listing-info.stuck .contacts-block-right-side {
		display: contents !important;
	}

	body.sticky-wrapper .directory-listing-info.stuck .contacts-block-right-side > :not(.drts-display-element-group-101) {
		display: none !important;
	}

	body.sticky-wrapper .directory-listing-info.stuck .drts-display-element-group-101.add-review-btn-mobile {
		display: flex !important;
		align-items: center;
		justify-content: flex-end;
		min-width: 0;
		width: auto !important;
		height: auto !important;
		margin: 0;
		opacity: 1 !important;
		visibility: visible !important;
	}

	body.sticky-wrapper .directory-listing-info.stuck [data-name="entity_field_review_ratings"] .drts-voting-rating-average {
		width: 42px;
		height: 42px;
		font-size: 1rem;
	}

	body.sticky-wrapper .directory-listing-info.stuck .drts-display-element-group-105.review-block-wrapper {
		display: flex !important;
		align-items: center;
		flex-wrap: nowrap;
		min-width: 0;
		width: auto !important;
		height: auto !important;
		padding-right: 8px;
		opacity: 1 !important;
		visibility: visible !important;
	}

	body.sticky-wrapper .directory-listing-info.stuck .drts-display-element-group-105.review-block-wrapper .add-details-review-btn,
	body.sticky-wrapper .directory-listing-info.stuck .drts-display-element-group-105.review-block-wrapper .add-details-review-btn .drts-bs-btn-group,
	body.sticky-wrapper .directory-listing-info.stuck .drts-display-element-group-105.review-block-wrapper .add-details-review-btn button {
		display: inline-flex !important;
		align-items: center;
		width: auto !important;
		height: auto !important;
		opacity: 1 !important;
		visibility: visible !important;
	}

	body.sticky-wrapper .directory-listing-info.stuck .review-block-wrapper .add-details-review-btn {
		margin-top: 0 !important;
	}

	body.sticky-wrapper .directory-listing-info.stuck .review-block-wrapper p {
		margin: 0;
		font-size: .8rem;
		white-space: nowrap;
	}

	/* Keep navigation available without allowing it to wrap into several rows. */
	body.sticky-wrapper .directory-listing-info.stuck .nursery-inner-menu {
		overflow-x: auto;
		overflow-y: hidden;
		width: 100%;
		margin-top: 6px;
		padding: 5px 0 2px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	body.sticky-wrapper .directory-listing-info.stuck .nursery-inner-menu::-webkit-scrollbar {
		display: none;
	}

	body.sticky-wrapper .directory-listing-info.stuck .nursery-own-menu {
		display: flex !important;
		align-items: center;
		flex-wrap: nowrap;
		width: max-content !important;
		min-width: 100%;
		gap: 18px;
	}

	body.sticky-wrapper .directory-listing-info.stuck .nursery-own-menu > .drts-display-group-element-separator {
		display: none !important;
	}

	body.sticky-wrapper .directory-listing-info.stuck .nursery-own-menu button {
		white-space: nowrap;
	}
}
