/* EstateSite Houzez — property blocks: QR code, Promo section, Nearby places, disclaimer,
   sub-offers table.
   Layouts follow the width of the place the block sits in (main column, sidebar,
   Elementor column) through container queries, not the screen width.
   Accent colour: set --eshz-accent on any parent to match the site. */

.eshz-block {
	container-type: inline-size;
}

.eshz-after-description {
	margin-top: 30px;
}

.eshz-after-description > .eshz-block + .eshz-block {
	margin-top: 30px;
}

h3.eshz-block-title {
	margin: 0 0 16px;
	font-size: 18px;
	line-height: 1.3;
}

/* ---- QR code ---- */

.eshz-qr {
	display: inline-block;
	max-width: 100%;
	text-align: center;
	line-height: 0;
}

.eshz-qr svg {
	display: block;
	width: var(--eshz-qr-size, 140px);
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

.eshz-qr-caption {
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.3;
	color: #6d6d6d;
}

.eshz-in-widget.eshz-qr-block {
	text-align: center;
}

/* ---- Promo section: QR on the left, buttons and text on the right ---- */

.eshz-promo {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
}

.eshz-promo-qr {
	flex: 0 0 auto;
	line-height: 0;
}

.eshz-promo-qr svg {
	display: block;
	width: 170px;
	height: auto;
	padding: 8px;
	border: 1px solid #ececec;
	border-radius: 8px;
	background: #fff;
}

.eshz-promo-body {
	flex: 1 1 300px;
	min-width: 0;
}

.eshz-promo-buttons {
	display: grid;
	grid-template-columns: repeat(var(--eshz-promo-cols, 3), minmax(0, 1fr));
	gap: 10px;
}

.eshz-promo-buttons + .eshz-promo-buttons {
	margin-top: 10px;
}

.eshz-promo-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 8px 16px;
	border: 1px solid #e4e6ea;
	border-radius: 999px;
	background: #fff;
	color: #2a2f36;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.eshz-promo-btn:hover,
.eshz-promo-btn:focus-visible {
	transform: translateY(-1px);
	border-color: #d4d7dd;
	color: #111;
	text-decoration: none;
}

.eshz-promo-btn:focus-visible {
	outline: 2px solid #2a7de1;
	outline-offset: 2px;
}

.eshz-promo-custom-btn {
	justify-content: center;
}

.eshz-promo-ico {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
}

.eshz-promo-ico svg {
	display: block;
	width: 20px;
	height: 20px;
}

.eshz-promo-label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.eshz-share-whatsapp .eshz-promo-ico { color: #25d366; }
.eshz-share-viber    .eshz-promo-ico { color: #7360f2; }
.eshz-share-telegram .eshz-promo-ico { color: #29a9eb; }
.eshz-share-facebook .eshz-promo-ico { color: #1877f2; }
.eshz-share-x        .eshz-promo-ico { color: #000; }
.eshz-share-linkedin .eshz-promo-ico { color: #0a66c2; }
.eshz-share-email    .eshz-promo-ico { color: #4b5563; }

.eshz-share-whatsapp:hover, .eshz-share-whatsapp:focus-visible { background: #25d366; border-color: #25d366; color: #fff; }
.eshz-share-viber:hover,    .eshz-share-viber:focus-visible    { background: #7360f2; border-color: #7360f2; color: #fff; }
.eshz-share-telegram:hover, .eshz-share-telegram:focus-visible { background: #29a9eb; border-color: #29a9eb; color: #fff; }
.eshz-share-facebook:hover, .eshz-share-facebook:focus-visible { background: #1877f2; border-color: #1877f2; color: #fff; }
.eshz-share-x:hover,        .eshz-share-x:focus-visible        { background: #000;    border-color: #000;    color: #fff; }
.eshz-share-linkedin:hover, .eshz-share-linkedin:focus-visible { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.eshz-share-email:hover,    .eshz-share-email:focus-visible    { background: #4b5563; border-color: #4b5563; color: #fff; }

.eshz-promo-btn:hover .eshz-promo-ico,
.eshz-promo-btn:focus-visible .eshz-promo-ico {
	color: #fff;
}

.eshz-promo-custom-btn:hover,
.eshz-promo-custom-btn:focus-visible {
	background: var(--eshz-accent, #2a2f36);
	border-color: var(--eshz-accent, #2a2f36);
	color: #fff;
}

.eshz-promo-text {
	margin-top: 16px;
	color: #5a616b;
}

.eshz-promo-text > :last-child {
	margin-bottom: 0;
}

@container (max-width: 760px) {
	.eshz-promo-buttons { --eshz-promo-cols: 2; }
}

@container (max-width: 440px) {
	.eshz-promo { justify-content: center; }
	.eshz-promo-qr svg { width: 150px; }
	.eshz-promo-body { flex-basis: 100%; }
	.eshz-promo-buttons { --eshz-promo-cols: 1; }
}

/* ---- Nearby places ---- */

.eshz-nearby {
	display: grid;
	grid-template-columns: repeat(var(--eshz-nearby-cols, 3), minmax(0, 1fr));
	gap: 24px 30px;
}

.eshz-nearby-cols-1 { --eshz-nearby-cols: 1; }
.eshz-nearby-cols-2 { --eshz-nearby-cols: 2; }
.eshz-nearby-cols-3 { --eshz-nearby-cols: 3; }
.eshz-nearby-cols-4 { --eshz-nearby-cols: 4; }

.eshz-nearby-cat-title {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid #ececec;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.eshz-nearby-cat-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, .05);
	color: var(--eshz-accent, #4b5563);
}

.eshz-nearby-cat-icon svg {
	display: block;
}

.eshz-nearby-cat-label {
	min-width: 0;
}

.eshz-nearby-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.eshz-nearby-item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 7px 0;
	font-size: 14px;
	line-height: 1.4;
}

.eshz-nearby-item + .eshz-nearby-item {
	border-top: 1px solid #f4f4f4;
}

.eshz-nearby-name {
	min-width: 0;
	overflow-wrap: anywhere;
}

.eshz-nearby-name a {
	color: inherit;
	text-decoration: none;
}

.eshz-nearby-name a:hover,
.eshz-nearby-name a:focus {
	color: var(--eshz-accent, inherit);
	text-decoration: underline;
}

.eshz-nearby-type {
	display: block;
	font-size: 12px;
	color: #8b8b8b;
}

.eshz-nearby-meta {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: #6d6d6d;
	white-space: nowrap;
}

.eshz-nearby-walk {
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

.eshz-nearby-walk svg {
	width: 14px;
	height: 14px;
	opacity: .7;
}

@container (max-width: 760px) {
	.eshz-nearby-cols-3,
	.eshz-nearby-cols-4 { --eshz-nearby-cols: 2; }
}

@container (max-width: 480px) {
	.eshz-nearby-cols-2,
	.eshz-nearby-cols-3,
	.eshz-nearby-cols-4 { --eshz-nearby-cols: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.eshz-promo-btn { transition: none; }
	.eshz-promo-btn:hover,
	.eshz-promo-btn:focus-visible { transform: none; }
}

/* ---- Sub-offers table ----
   Colours come from the settings as --eshz-sub-head-bg, --eshz-sub-head-color,
   --eshz-sub-border and --eshz-sub-accent; unset, the theme's own apply. */

.eshz-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.eshz-sub-offers {
	--eshz-sub-pad: 12px 14px;
	/* Holds the visually hidden headings, so they stay inside the sideways scroll. */
	position: relative;
}

.eshz-sub-compact {
	--eshz-sub-pad: 7px 10px;
}

.eshz-sub-roomy {
	--eshz-sub-pad: 16px 18px;
}

.eshz-sub-group {
	margin: 28px 0 10px;
	font-size: 16px;
	line-height: 1.3;
}

.eshz-sub-offers > .eshz-sub-group:first-child {
	margin-top: 0;
}

.eshz-sub-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.4;
}

.eshz-sub-table th,
.eshz-sub-table td {
	padding: var(--eshz-sub-pad);
	text-align: start;
	vertical-align: middle;
	border: 0;
	border-bottom: 1px solid var(--eshz-sub-border, #e6e6e6);
}

.eshz-sub-table thead th {
	background: var(--eshz-sub-head-bg, #f7f7f7);
	color: var(--eshz-sub-head-color, inherit);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.eshz-sub-stripes .eshz-sub-table tbody tr:nth-child(even) td {
	background: rgba(0, 0, 0, .025);
}

.eshz-sub-table tbody tr:hover td {
	background: rgba(0, 0, 0, .045);
}

.eshz-sub-table td.eshz-sub-col-price {
	font-weight: 600;
}

/* Listing titles are sentences; keep them from collapsing to a word per line. */
.eshz-sub-table-listings td.eshz-sub-col-name {
	min-width: 11em;
}

.eshz-sub-col-type,
.eshz-sub-col-floor,
.eshz-sub-col-rooms,
.eshz-sub-col-area,
.eshz-sub-col-price,
.eshz-sub-col-price_m2,
.eshz-sub-col-status {
	white-space: nowrap;
}

.eshz-sub-table .eshz-sub-col-link {
	width: 1%;
	text-align: end;
	white-space: nowrap;
}

.eshz-sub-table td a:not(.eshz-sub-button) {
	color: var(--eshz-sub-accent, inherit);
}

.eshz-sub-button {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid var(--eshz-sub-accent, var(--eshz-accent, #2a2f36));
	border-radius: 4px;
	color: var(--eshz-sub-accent, var(--eshz-accent, #2a2f36));
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color .15s, color .15s;
}

.eshz-sub-button:hover,
.eshz-sub-button:focus-visible {
	background: var(--eshz-sub-accent, var(--eshz-accent, #2a2f36));
	color: #fff;
	text-decoration: none;
}

.eshz-sub-status {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .06);
	font-size: 12px;
	line-height: 1.5;
}

/* Narrow, "scroll sideways": the table keeps its columns. */
.eshz-sub-mobile-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.eshz-sub-mobile-scroll .eshz-sub-table {
	min-width: 640px;
}

/* Narrow, "one card per unit": each row becomes a card, headings move into the cells. */
@container (max-width: 600px) {
	.eshz-sub-mobile-cards .eshz-sub-table,
	.eshz-sub-mobile-cards .eshz-sub-table tbody,
	.eshz-sub-mobile-cards .eshz-sub-table tr,
	.eshz-sub-mobile-cards .eshz-sub-table td {
		display: block;
		width: auto;
	}

	.eshz-sub-mobile-cards .eshz-sub-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}

	.eshz-sub-mobile-cards .eshz-sub-table tr {
		margin-bottom: 12px;
		overflow: hidden;
		border: 1px solid var(--eshz-sub-border, #e6e6e6);
		border-radius: 6px;
	}

	.eshz-sub-mobile-cards .eshz-sub-table td {
		display: flex;
		justify-content: space-between;
		gap: 16px;
		text-align: end;
		white-space: normal;
	}

	.eshz-sub-mobile-cards .eshz-sub-table td:last-child {
		border-bottom: 0;
	}

	/* A unit with nothing in a column skips that line of its card. */
	.eshz-sub-mobile-cards .eshz-sub-table td:empty {
		display: none;
	}

	.eshz-sub-mobile-cards .eshz-sub-table td[data-label]::before {
		content: attr(data-label);
		flex: 0 0 auto;
		color: #6d6d6d;
		font-weight: 600;
		text-align: start;
	}

	.eshz-sub-mobile-cards .eshz-sub-table td.eshz-sub-col-name {
		justify-content: flex-start;
		background: var(--eshz-sub-head-bg, #f7f7f7);
		color: var(--eshz-sub-head-color, inherit);
		font-weight: 600;
		text-align: start;
	}

	.eshz-sub-mobile-cards .eshz-sub-table td.eshz-sub-col-name::before {
		display: none;
	}

	.eshz-sub-mobile-cards .eshz-sub-table td.eshz-sub-col-link {
		justify-content: flex-end;
	}

	.eshz-sub-mobile-cards.eshz-sub-stripes .eshz-sub-table tbody tr:nth-child(even) td:not(.eshz-sub-col-name),
	.eshz-sub-mobile-cards .eshz-sub-table tbody tr:hover td:not(.eshz-sub-col-name) {
		background: transparent;
	}
}

@media (prefers-reduced-motion: reduce) {
	.eshz-sub-button {
		transition: none;
	}
}
