/**
 * Casas Choice Features — Off-Market section.
 *
 * Matches the Penpot boards "Off-Market", "Off-Market - com log-in", the
 * "Pedir acesso" / "Já tem código de acesso?" popups and the Mobile boards.
 * Colours are the sitewide palette (--theme-palette-color-1..9, theme
 * style.css); cards and the 3-column grid come from the theme's
 * comprar.css (.cc-listing-card / .cc-listing-grid).
 */

.ccf-om {
	--ccf-ink: var(--theme-palette-color-5, #333538);
	--ccf-ink-soft: var(--theme-palette-color-6, #54565A);
	--ccf-border: var(--theme-palette-color-7, #C4C7CA);
	--ccf-field-border: #D1D4D5;
	--ccf-bg-alt: var(--theme-palette-color-8, #F2F3F4);
	--ccf-white: var(--theme-palette-color-9, #FFFFFF);
	--ccf-accent: var(--theme-palette-color-1, #00A6CE);
	--ccf-orange: var(--theme-palette-color-3, #FF5100);
	--ccf-font: 'Montserrat', sans-serif;

	color: var(--ccf-ink);
	font-family: var(--ccf-font);
}

.ccf-om *,
.ccf-om *::before,
.ccf-om *::after {
	box-sizing: border-box;
}

.ccf-om-icon {
	display: block;
	flex: none;
}

/* Menu item pointing at the Off-Market page: "Off-Market 🔒". */
.ccf-om-lock {
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 6px;
	vertical-align: -2px;
	flex: none;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.ccf-om-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 36px;
	padding: 0 24px;
	border: 1px solid var(--ccf-ink);
	border-radius: 4px;
	background: var(--ccf-ink);
	color: var(--ccf-white);
	font-family: var(--ccf-font);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: opacity .2s ease, background-color .2s ease, color .2s ease;
}

.ccf-om-btn:focus-visible {
	opacity: .85;
	color: var(--ccf-white);
}

@media (hover: hover) {
	.ccf-om-btn:hover {
		opacity: .85;
		color: var(--ccf-white);
	}
}

.ccf-om-btn:focus-visible,
.ccf-om-modal__close:focus-visible {
	outline: 2px solid var(--ccf-accent);
	outline-offset: 2px;
}

.ccf-om-btn--outline {
	background: transparent;
	border-color: var(--ccf-ink-soft);
	color: var(--ccf-ink);
}

/* Touch screens keep the last tapped element in :hover. Our own :hover
   rules are hover-devices-only, so Blocksy's generic `button:hover` would
   still turn the outline button dark (or blue) there — keep it as is. */
@media (hover: none) {
	.ccf-om .ccf-om-btn--outline:hover {
		background: transparent;
		border-color: var(--ccf-ink-soft);
		color: var(--ccf-ink);
	}
}

.ccf-om-btn--outline:focus-visible {
	opacity: 1;
	background: var(--ccf-white);
	color: var(--ccf-ink);
}

@media (hover: hover) {
	.ccf-om-btn--outline:hover {
		opacity: 1;
		background: var(--ccf-white);
		color: var(--ccf-ink);
	}
}

.ccf-om-btn--lg {
	height: 48px;
	padding: 0 40px;
	border-radius: 6px;
}

.ccf-om-btn[disabled] {
	opacity: .6;
	cursor: progress;
}

.ccf-om-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* ---------------------------------------------------------------------- */
/* [cc_offmarket_login]                                                    */
/* ---------------------------------------------------------------------- */

.ccf-om-login__text {
	margin: 0 0 16px;
	font-size: 16px;
	line-height: 1.8;
	color: var(--ccf-ink);
}

/* Mobile sticky bottom bar — shown once the login block scrolls away. */
.ccf-om-sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 40;
	display: none;
	padding: 12px 24px calc(16px + env(safe-area-inset-bottom, 0px));
	background: var(--ccf-white);
	box-shadow: 0 -4px 12px rgba(0, 0, 0, .08);
	transform: translateY(100%);
	visibility: hidden;
	transition: transform .25s ease, visibility 0s linear .25s;
}

.ccf-om-sticky.is-visible {
	transform: translateY(0);
	visibility: visible;
	transition: transform .25s ease, visibility 0s;
}

.ccf-om-sticky__text {
	margin: 0 0 10px;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
	color: var(--ccf-ink);
}

/* ---------------------------------------------------------------------- */
/* Popups                                                                  */
/* ---------------------------------------------------------------------- */

.ccf-om-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.ccf-om-modal[hidden] {
	display: none;
}

.ccf-om-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
	opacity: 0;
	transition: opacity .2s ease;
}

.ccf-om-modal__panel {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	overflow-y: auto;
	padding: 48px;
	background: var(--ccf-bg-alt);
	box-shadow: 0 24px 48px rgba(0, 0, 0, .18);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .2s ease, transform .2s ease;
}

.ccf-om-modal__panel--code {
	max-width: 720px;
}

.ccf-om-modal.is-open .ccf-om-modal__overlay,
.ccf-om-modal.is-open .ccf-om-modal__panel {
	opacity: 1;
	transform: none;
}

.ccf-om-modal__close {
	position: absolute;
	top: 24px;
	right: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--ccf-ink);
	cursor: pointer;
}

@media (hover: hover) {
	.ccf-om-modal__close:hover {
		background: rgba(0, 0, 0, .05);
	}
}

.ccf-om-modal__eyebrow {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .5px;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--ccf-accent);
}

.ccf-om-modal__eyebrow .ccf-om-icon {
	width: 14px;
	height: 14px;
}

.ccf-om-modal__title {
	margin: 0 0 20px;
	padding-right: 40px;
	font-family: var(--ccf-font);
	font-size: 24px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--ccf-ink);
}

.ccf-om-modal__title--lg {
	margin-bottom: 20px;
	font-size: 36px;
	font-weight: 300;
	line-height: 1.2;
}

.ccf-om-modal__text {
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 1.75;
	color: var(--ccf-ink);
}

.ccf-om-modal__panel--request .ccf-om-modal__text {
	margin-bottom: 32px;
}

.ccf-om-modal__note {
	margin: 24px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--ccf-orange);
}

body.ccf-om-modal-open {
	overflow: hidden;
}

/* Fields ("Pedir acesso"). */
.ccf-om-field {
	margin: 0 0 20px;
}

.ccf-om-field label {
	display: block;
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--ccf-ink);
}

.ccf-om-field input,
.ccf-om-field textarea,
.ccf-om-code input {
	display: block;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--ccf-field-border);
	border-radius: 6px;
	background: var(--ccf-white);
	box-shadow: none;
	color: var(--ccf-ink);
	font-family: var(--ccf-font);
	font-size: 15px;
	line-height: 1.4;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.ccf-om-field textarea {
	height: 112px;
	padding: 12px 14px;
	resize: vertical;
}

.ccf-om-field input:focus,
.ccf-om-field textarea:focus,
.ccf-om-code input:focus {
	outline: none;
	border-color: var(--ccf-ink);
	box-shadow: 0 0 0 3px rgba(0, 166, 206, .18);
}

.ccf-om-field input[aria-invalid="true"],
.ccf-om-code input[aria-invalid="true"] {
	border-color: var(--ccf-orange);
}

.ccf-om-field__error {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--ccf-orange);
}

.ccf-om-field__error:empty {
	display: none;
}

.ccf-om-form .ccf-om-btn--lg {
	margin-top: 12px;
	padding: 0 48px;
}

.ccf-om-form__message {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ccf-orange);
}

.ccf-om-code + .ccf-om-form__message {
	margin: 16px 0 0;
}

.ccf-om-form__message[hidden] {
	display: none;
}

.ccf-om-form__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Code row: input + "Entrar". */
.ccf-om-code {
	display: flex;
	gap: 8px;
}

.ccf-om-code input {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 16px;
	letter-spacing: .5px;
}

.ccf-om-code input:not(:placeholder-shown) {
	text-transform: uppercase;
	letter-spacing: 2px;
}

.ccf-om-code .ccf-om-btn--lg {
	padding: 0 32px;
}

/* ---------------------------------------------------------------------- */
/* [cc_offmarket_acesso] — card in the Off-Market promo banner             */
/* ---------------------------------------------------------------------- */

.ccf-om-card {
	width: 100%;
	max-width: 440px;
	margin-left: auto;
	padding: 36px 40px;
	border-radius: 4px;
	background: var(--ccf-white);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
	text-align: left;
}

.ccf-om-card__title {
	margin: 0 0 16px;
	color: var(--ccf-ink);
	font-family: var(--ccf-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
}

.ccf-om-card .ccf-om-code input {
	height: 40px;
	padding: 0 14px;
	border-color: var(--ccf-bg-alt);
	border-radius: 2px;
	background: var(--ccf-bg-alt);
	font-size: 14px;
}

.ccf-om-card .ccf-om-code input::placeholder {
	color: var(--ccf-border);
	letter-spacing: 3px;
	opacity: 1;
}

.ccf-om-card .ccf-om-code input:focus {
	background: var(--ccf-white);
}

/* The theme gives every button min-height: 44px. */
.ccf-om-card .ccf-om-btn {
	min-height: 0;
}

.ccf-om-card .ccf-om-code .ccf-om-btn {
	height: 40px;
	padding: 0 22px;
}

/* "Ainda sem acesso?" sits right on top of its sentence. */
.ccf-om-card__title--lead {
	margin-bottom: 6px;
}

/* Secondary "Entrar": the generic outline hover turns the button white,
 * which doesn't show on the white card — darken the border instead. */
.ccf-om-card .ccf-om-btn--outline:focus-visible {
	border-color: var(--ccf-ink);
	background: transparent;
}

@media (hover: hover) {
	.ccf-om-card .ccf-om-btn--outline:hover {
		border-color: var(--ccf-ink);
		background: transparent;
	}
}

.ccf-om-card .ccf-om-form__message {
	margin: 10px 0 0;
	font-size: 13px;
}

.ccf-om-card__divider {
	height: 1px;
	margin: 24px 0 20px;
	border: 0;
	background: var(--ccf-border);
	opacity: .6;
}

.ccf-om-card__text {
	margin: 0 0 16px;
	color: var(--ccf-ink-soft);
	font-family: var(--ccf-font);
	font-size: 14px;
	line-height: 1.6;
}

.ccf-om-card__btn {
	height: 36px;
	padding: 0 20px;
	font-size: 13px;
}

.ccf-om-card__icon {
	width: 14px;
	height: 14px;
}

.ccf-om-card--active .ccf-om-card__title {
	margin-bottom: 20px;
}

/* ---------------------------------------------------------------------- */
/* [cc_offmarket_imoveis]                                                  */
/* ---------------------------------------------------------------------- */

/* Its own full-bleed grey band (the page content around it is white in
   the design). The shortcode usually sits inside a Greenshift row/column,
   which is narrower than the viewport and padded — break out of it to the
   viewport edges, then .ct-container (inner) lines the content up with the
   site container again. --ccf-om-sbw (set by offmarket.js) is the vertical
   scrollbar width, so 100vw doesn't overshoot on desktop. */
.ccf-om-imoveis {
	margin-left: calc(50% - 50vw + var(--ccf-om-sbw, 0px) / 2);
	margin-right: calc(50% - 50vw + var(--ccf-om-sbw, 0px) / 2);
	background: var(--ccf-bg-alt);
}

.ccf-om-imoveis .cc-listing__container {
	padding: 70px 0 96px 0;
}

.ccf-om-imoveis__head {
	margin: 0 0 28px;
}

.ccf-om-imoveis__title {
	margin: 0 0 8px;
	font-weight: 300;
}

.ccf-om-imoveis__title em {
	font-style: italic;
	color: var(--ccf-accent);
}

.ccf-om-imoveis__sub {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

.ccf-om-imoveis__staff {
	display: none;
	margin: 12px 0 0;
	font-size: 12px;
}

.ccf-om-imoveis__sub--mobile {
	display: none;
}

.ccf-om-imoveis .ccf-om-imoveis__grid {
	gap: 32px 20px;
}

/* [cc_offmarket_teaser]: whole card opens the code popup. */
.ccf-om-teaser {
	padding: 64px 0;
}

.ccf-om-teaser__head {
	margin: 0 0 32px;
}

.ccf-om-teaser__title {
	max-width: 469px;
	margin: 0 0 8px;
}

.ccf-om-teaser__text {
	max-width: 675px;
	margin: 0;
}

.ccf-om-teaser .ccf-om-teaser__grid {
	/* minmax(0, …): the cards' Swiper strip would otherwise widen 1fr. */
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px 20px;
}

.ccf-om-teaser__card,
.ccf-om-teaser__card .cc-listing-card {
	height: 100%;
}

.ccf-om-teaser__card .cc-gcard__img {
	cursor: pointer;
}

/* [cc_offmarket_cta]: closing call to action of the Off-Market page — a
   full-bleed white band (same break-out as .ccf-om-imoveis), centred.
   Title / text typography is the theme's own h2 / p. */
.ccf-om-cta {
	margin-left: calc(50% - 50vw + var(--ccf-om-sbw, 0px) / 2);
	margin-right: calc(50% - 50vw + var(--ccf-om-sbw, 0px) / 2);
	padding: 96px 0;
	background: var(--ccf-white);
}

.ccf-om-cta__inner {
	max-width: 640px;
	margin: 0 auto;
	text-align: center;
}

.ccf-om-cta__eyebrow {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .5px;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--ccf-accent);
}

.ccf-om-cta__eyebrow .ccf-om-icon {
	width: 14px;
	height: 14px;
}

.ccf-om-cta__title {
	margin: 0 0 16px;
}

.ccf-om-cta__text {
	margin: 0 0 32px;
}

.ccf-om-cta .ccf-om-actions {
	justify-content: center;
}

/* Pagination. */
.ccf-om-pager {
	margin: 56px 0 0;
}

.ccf-om-pager ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ccf-om-pager li {
	margin: 0;
}

.ccf-om-pager .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 8px;
	border: 1px solid var(--ccf-border);
	border-radius: 4px;
	background: var(--ccf-white);
	color: var(--ccf-ink);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: border-color .15s ease;
}

.ccf-om-pager a.page-numbers:focus-visible {
	border-color: var(--ccf-ink);
	color: var(--ccf-ink);
}

@media (hover: hover) {
	.ccf-om-pager a.page-numbers:hover {
		border-color: var(--ccf-ink);
		color: var(--ccf-ink);
	}
}

.ccf-om-pager .page-numbers.current {
	border-color: var(--ccf-ink);
	background: var(--ccf-ink);
	color: var(--ccf-white);
}

.ccf-om-pager .page-numbers.dots {
	border-color: transparent;
	background: transparent;
}

.ccf-om-pager .ccf-om-icon {
	width: 18px;
	height: 18px;
}

/* Fallback card when the Choice theme isn't active. */
.ccf-om__card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	color: inherit;
	text-decoration: none;
}

.ccf-om__card img {
	width: 100%;
	height: auto;
}

.ccf-om__card-title {
	font-size: 18px;
}

/* ---------------------------------------------------------------------- */
/* Session bar                                                             */
/* ---------------------------------------------------------------------- */

/* Thin full-width strip at the very top of the page, above the Blocksy
   header — "O seu acesso Off-Market expira em 59:06". It sticks to the top
   while scrolling; offmarket.js sets --header-sticky-offset on <body> to its
   height, so Blocksy's sticky header docks right below it. z-index sits
   above #header (50), whose in-flow part would otherwise scroll over the
   bar; popups and the Blocksy off-canvas menu stay above it. */
.ccf-om-bar {
	position: sticky;
	top: var(--admin-bar, 0px);
	z-index: 51;
	width: 100%;
	background: var(--theme-palette-color-5, #333538);
	color: var(--theme-palette-color-9, #fff);
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	line-height: 1.3;
	transition: background-color .3s ease;
}

.ccf-om-bar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	max-width: 1800px;
	margin-inline: auto;
	padding: 6px min(4vw, 60px);
	text-align: center;
}

.ccf-om-bar__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--theme-palette-color-1, #00A6CE);
	flex: none;
}

.ccf-om-bar__time {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--theme-palette-color-3, #FF5100);
}

/* Last minutes (Pods "Aviso de expiração"). */
.ccf-om-bar.is-warning {
	background: var(--theme-palette-color-3, #FF5100);
}

.ccf-om-bar.is-warning .ccf-om-bar__time {
	color: var(--theme-palette-color-9, #fff);
}

.ccf-om-bar.is-warning .ccf-om-bar__dot {
	background: var(--theme-palette-color-9, #fff);
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 999px) {
	.ccf-om-sticky {
		display: block;
	}

	.ccf-om-cta {
		padding: 64px 0;
	}

	.ccf-om-imoveis .cc-listing__container {
		padding: 38px 0 64px 0;
	}

	.ccf-om-teaser {
		padding: 48px 0;
	}
}

/* Same breakpoint as the theme's .cc-listing-grid (comprar.css). */
@media (max-width: 768px) {
	.ccf-om-teaser .ccf-om-teaser__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 689px) {
	.ccf-om-login__text {
		font-size: 15px;
		line-height: 1.75;
	}

	.ccf-om-actions .ccf-om-btn {
		flex: 1 1 0;
		height: 32px;
		padding: 0 12px;
	}

	.ccf-om-modal {
		padding: 16px;
	}

	.ccf-om-modal__panel {
		max-height: calc(100vh - 32px);
		max-height: calc(100dvh - 32px);
		padding: 32px 24px;
	}

	.ccf-om-modal__close {
		top: 12px;
		right: 12px;
	}

	.ccf-om-modal__title--lg {
		font-size: 28px;
	}

	.ccf-om-modal__title {
		font-size: 22px;
	}

	.ccf-om-code .ccf-om-btn--lg {
		padding: 0 20px;
	}

	.ccf-om-form .ccf-om-btn--lg {
		width: 100%;
	}

	.ccf-om-imoveis .cc-listing__container {
		padding-block: 40px 56px;
	}

	.ccf-om-imoveis__sub--desktop {
		display: none;
	}

	.ccf-om-imoveis__sub--mobile {
		display: block;
	}

	.ccf-om-imoveis .ccf-om-imoveis__grid,
	.ccf-om-teaser .ccf-om-teaser__grid {
		gap: 24px;
	}

	.ccf-om-bar {
		font-size: 11px;
	}

	.ccf-om-card {
		max-width: none;
		padding: 28px 24px;
	}
}
