/*
 * ckk/property-* and ckk/tenant-marquee (ckk-mazaheri-core plugin).
 *
 * The plugin's own block CSS is structural and reads `--wp--preset--*`; this
 * sheet is the design. Every block renders `<section class="wp-block-ckk-…
 * ckk-section">` with a `.ckk-section__head` (title + note) and returns nothing
 * when its data is empty, so the rhythm below only appears for sections that
 * exist.
 */

.ckk-section {
	padding-top: var(--wp--preset--spacing--section);
	padding-bottom: var(--wp--preset--spacing--section);
}

.ckk-section + .ckk-section {
	padding-top: 0;
}

.ckk-section > .ckk-section__inner,
.ckk-section > .wp-block-group {
	max-width: var(--wp--style--global--content-size);
	margin-right: auto;
	margin-left: auto;
}

.ckk-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 30px;
	margin-bottom: 44px;
}

.ckk-section__heading {
	max-width: var(--wp--custom--measure--section-title);
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--h-2-compact);
	font-weight: 600;
	line-height: 1.04;
	letter-spacing: var(--wp--custom--letter-spacing--heading);
	color: var(--wp--preset--color--navy);
}

.ckk-section__note {
	max-width: 34ch;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--wp--preset--color--gray-text);
}

.is-style-section-dark .ckk-section__heading,
.is-style-section-dark .ckk-section__note {
	color: #fff;
}

.is-style-section-dark .ckk-section__note {
	color: var(--wp--custom--on-dark--text);
}

/* Stats: "At a glance" stat line. */
.wp-block-ckk-property-stats .ckk-section__head {
	margin-bottom: 20px;
}

.ckk-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 28px 60px;
	padding-top: 30px;
	border-top: 1px solid var(--wp--preset--color--line);
}

.ckk-stat {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ckk-stat__number {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--stat-xs);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--navy);
}

.ckk-stat__number em {
	font-style: italic;
	font-weight: 500;
	color: var(--wp--preset--color--steel);
}

.ckk-stat__label {
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--gray-text);
}

/* Demographics: one column per radius, plus the traffic table. */
.dtable,
.ckk-demo {
	width: 100%;
	border-collapse: collapse;
}

.dtable th,
.dtable td {
	padding: 14px 24px 14px 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	text-align: left;
	vertical-align: baseline;
}

.dtable thead th {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--steel);
}

.dtable tbody th {
	font-size: 0.875rem;
	font-weight: 400;
	color: var(--wp--preset--color--gray-text);
}

.dtable td {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.4375rem;
	font-weight: 600;
	line-height: 1.15;
	color: var(--wp--preset--color--navy);
}

.ckk-traffic {
	margin-top: 40px;
}

/* Documents: button rows share the core button look. */
.wp-block-ckk-property-documents .ckk-documents {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.wp-block-ckk-property-documents a {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 13px 22px;
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius--button);
	background: var(--wp--preset--color--navy);
	font-size: 0.875rem;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
	transition:
		background 0.35s var(--wp--custom--ease),
		border-color 0.35s var(--wp--custom--ease);
}

.wp-block-ckk-property-documents a:hover {
	background: var(--wp--preset--color--navy-700);
}

.wp-block-ckk-property-documents .is-layout-inline,
.wp-block-ckk-property-documents.is-layout-inline {
	padding: 0;
}

.is-style-action-bar .wp-block-ckk-property-documents {
	padding: 0;
}

.is-style-action-bar .wp-block-ckk-property-documents a {
	padding: 12px 20px;
	font-size: 0.84375rem;
}

/* Spaces: lease terms as a definition list, suites as a table. */
.wp-block-ckk-property-spaces dl {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 24px 44px;
	margin: 0 0 30px;
}

.wp-block-ckk-property-spaces dt {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--steel);
}

.wp-block-ckk-property-spaces dd {
	margin: 7px 0 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.4375rem;
	font-weight: 600;
	line-height: 1.15;
	color: var(--wp--preset--color--navy);
}

.wp-block-ckk-property-spaces table {
	width: 100%;
	border-collapse: collapse;
}

.wp-block-ckk-property-spaces th,
.wp-block-ckk-property-spaces td {
	padding: 14px 24px 14px 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	text-align: left;
	font-size: 0.9375rem;
}

.wp-block-ckk-property-spaces th {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--steel);
}


/*
 * A tinted section keeps its own top padding.
 *
 * `.ckk-section + .ckk-section { padding-top: 0 }` above exists so untinted
 * sections stack without doubling the gap between them. Applied to a section
 * that paints a background, it starts the tint flush against the heading while
 * leaving a full section of space below it — visibly lopsided, and the reason
 * the gallery reads as having no padding.
 */
.ckk-section + .wp-block-ckk-property-gallery.ckk-section {
	padding-top: var(--wp--preset--spacing--section);
}

.ckk-gallery {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: 200px;
	gap: 14px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.ckk-gallery > * {
	position: relative;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	background: var(--wp--preset--gradient--fall);
}

.ckk-gallery > :nth-child(1) {
	grid-column: span 2;
	grid-row: span 2;
}

.ckk-gallery > :nth-child(4),
.ckk-gallery > :nth-child(9) {
	grid-column: span 2;
}

.ckk-gallery button {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.ckk-gallery img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s var(--wp--custom--ease);
}

.ckk-gallery > :hover img {
	transform: scale(1.06);
}

.wp-block-ckk-property-gallery dialog {
	max-width: none;
	max-height: none;
	width: 100vw;
	height: 100dvh;
	margin: 0;
	padding: 40px;
	border: 0;
	background: rgba(6, 14, 30, 0.94);
	color: #fff;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.wp-block-ckk-property-gallery dialog::backdrop {
	background: transparent;
}

.wp-block-ckk-property-gallery dialog img {
	display: block;
	max-width: 92vw;
	max-height: 86vh;
	width: auto;
	height: auto;
	margin: auto;
	border-radius: 6px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.wp-block-ckk-property-gallery dialog button {
	position: absolute;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	font-size: 1.25rem;
	color: #fff;
	cursor: pointer;
	transition: background 0.3s var(--wp--custom--ease);
}

.wp-block-ckk-property-gallery dialog button:hover {
	background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {

	.ckk-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: 160px;
	}
}

@media (max-width: 680px) {

	.ckk-gallery {
		grid-auto-rows: 140px;
	}
}

/* Site plan: framed, contained. */
.wp-block-ckk-property-site-plan figure,
.wp-block-ckk-property-site-plan .ckk-frame {
	margin: 10px 0 0;
	padding: 20px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--paper);
}

.wp-block-ckk-property-site-plan img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--wp--custom--radius--tile);
	background: #fff;
	object-fit: contain;
}

/* Map: rounded embed; the section around it is a dark core group. */
.wp-block-ckk-property-map .ckk-map-embed,
.wp-block-ckk-property-map iframe {
	display: block;
	width: 100%;
	border: 0;
}

.wp-block-ckk-property-map .ckk-map-embed {
	height: 480px;
	margin-top: 22px;
	overflow: hidden;
	border: 1px solid var(--wp--custom--on-dark--border);
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--navy-darker);
}

.wp-block-ckk-property-map iframe {
	height: 100%;
}

.wp-block-ckk-property-map.ckk-section {
	padding-top: 0;
	padding-bottom: 0;
}

@media (max-width: 680px) {

	.wp-block-ckk-property-map .ckk-map-embed {
		height: 360px;
	}
}

/* Tenants: serif chips, or a marquee. */
.ckk-roster {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 40px 0 0;
	padding: 0;
	list-style: none;
}

.ckk-roster > li,
.ckk-tenant {
	padding: 13px 22px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--submenu-item);
	background: var(--wp--preset--color--paper);
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.3125rem;
	font-weight: 600;
	color: var(--wp--preset--color--navy);
	transition:
		border-color 0.3s var(--wp--custom--ease),
		transform 0.3s var(--wp--custom--ease);
}

.ckk-roster > li:hover,
.ckk-tenant:hover {
	border-color: var(--wp--preset--color--steel);
	transform: translateY(-2px);
}

.wp-block-ckk-property-tenants .ckk-section__head {
	margin-bottom: 8px;
}

.wp-block-ckk-property-tenants.ckk-section {
	padding-bottom: 0;
}

/* Marquee: doubled track scrolling left, paused on hover. */
.wp-block-ckk-tenant-marquee.ckk-section {
	padding-top: 62px;
	padding-bottom: 0;
}

.wp-block-ckk-tenant-marquee .ckk-section__head {
	margin-bottom: 22px;
}

.ckk-marquee {
	overflow: hidden;
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	-webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

.ckk-marquee__track {
	display: flex;
	width: max-content;
	margin: 0;
	padding: 0;
	list-style: none;
	animation: ckk-marquee var(--ckk-marquee-duration, 48s) linear infinite;
}

.ckk-marquee:hover .ckk-marquee__track {
	animation-play-state: paused;
}

/*
 * Under reduced motion the block stops scrolling and unwraps the track into a
 * centred block of logos, which needs the row to be allowed to wrap. The
 * `width: max-content` above is what makes the animation possible and is also
 * what would keep it a single 4140px row here, running the logos off the side
 * of the page, so it is released rather than left to fight the block's own
 * `flex-wrap: wrap`.
 */
@media (prefers-reduced-motion: reduce) {

	.ckk-marquee__track {

		/*
		 * The block makes the track `flex: none` so the animation can run at its
		 * content width; left alone that also refuses to shrink here, so the row
		 * is given the container's width back before it can wrap.
		 */
		width: 100%;
		flex: 0 1 auto;
		flex-wrap: wrap;
		justify-content: center;
		animation: none;
	}
}

.ckk-marquee__item {
	display: grid;
	flex: 0 0 200px;
	place-items: center;
	height: 120px;
	padding: 0 20px;
}

.ckk-marquee__item img {
	width: auto;
	height: auto;
	max-width: 150px;
	max-height: 40px;
	object-fit: contain;
	opacity: 0.92;
	transition:
		opacity 0.3s var(--wp--custom--ease),
		transform 0.3s var(--wp--custom--ease);
}

.ckk-marquee__item img:hover {
	opacity: 1;
	transform: scale(1.07);
}

@media (max-width: 680px) {

	.wp-block-ckk-tenant-marquee.ckk-section {
		padding-top: 48px;
	}

	.ckk-marquee__item {
		flex: 0 0 150px;
		height: 96px;
		padding: 0 16px;
	}

	.ckk-marquee__item img {
		max-width: 120px;
		max-height: 34px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.ckk-marquee__track {
		animation: none;
	}
}

/*
 * "Last reviewed <date>" under the fact summary on a property page.
 *
 * Quiet on purpose: it is a provenance note for a prospect deciding whether to
 * trust a suite table, not a headline. It has to be legible, though — an
 * unreadable date is the same as no date, and the whole point of putting it on
 * the page is that somebody sees it.
 */
.ckk-reviewed {
	margin-top: 14px;
	color: var(--wp--preset--color--steel);
}

.ckk-reviewed time {
	font-variant-numeric: tabular-nums;
}
