/* ==========================================================================
   Shiksite Apartments Filter Generator
   All selectors are namespaced under .shiksite-apf to avoid collisions.
   Theming is driven by CSS custom properties so Elementor controls can
   override values without selector-specificity battles.
   ========================================================================== */

.shiksite-apf {
	--apf-text: #1a1a1a;
	--apf-overlay-bg: #fffbf2;
	--apf-btn-bg: #fffbf2;
	--apf-btn-text: #1a1a1a;
	--apf-btn-border: rgba(0, 0, 0, 0.18);
	--apf-backdrop: rgba(0, 0, 0, 0.82);
	--apf-radius: 4px;
	--apf-gap: 14px;
	--apf-align: center;

	color: var(--apf-text);
	font-family: inherit;
	box-sizing: border-box;
}

.shiksite-apf *,
.shiksite-apf *::before,
.shiksite-apf *::after {
	box-sizing: border-box;
}

/* ----- Tab rows ----- */
.shiksite-apf__level {
	display: flex;
	flex-wrap: wrap;
	gap: var(--apf-gap);
	align-items: center;
	justify-content: var(--apf-align);
}

.shiksite-apf__buildings {
	margin-bottom: 28px;
}

.shiksite-apf__apartments {
	margin-bottom: 20px;
}

.shiksite-apf__tab {
	font: inherit;
	margin: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	line-height: 1.2;
	-webkit-appearance: none;
	appearance: none;
	transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.shiksite-apf__tab[hidden] {
	display: none !important;
}

/* ----- Level 1: Buildings (boxed) ----- */
.shiksite-apf__building {
	border: 1px solid var(--apf-text);
	border-radius: 2px;
	padding: 10px 34px;
	font-size: 22px;
	font-weight: 700;
}

.shiksite-apf__building.is-active {
	background-color: #111111;
	border-color: #111111;
	color: #ffffff;
}

.shiksite-apf__building:not(.is-active):hover {
	opacity: 0.7;
}

/* ----- Level 2: Apartment types ----- */
.shiksite-apf__apt {
	font-size: 20px;
	font-weight: 600;
	padding: 4px 6px;
}

.shiksite-apf__apt:hover {
	opacity: 0.7;
}

.shiksite-apf__apt.is-active {
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 2px;
}

/* ----- Level 3: Models ----- */
.shiksite-apf__model {
	font-size: 22px;
	font-weight: 700;
	padding: 4px 6px;
}

.shiksite-apf__model:hover {
	opacity: 0.7;
}

.shiksite-apf__model.is-active {
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 2px;
}

/* ----- Editor empty state ----- */
.shiksite-apf__empty {
	padding: 24px;
	text-align: center;
	border: 1px dashed rgba(0, 0, 0, 0.3);
	border-radius: 4px;
	color: #555;
}

/* ==========================================================================
   Popup / Lightbox
   ========================================================================== */

.shiksite-apf__modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.shiksite-apf__modal.is-open {
	display: flex;
}

.shiksite-apf__modal:fullscreen {
	background: var(--apf-backdrop);
}

.shiksite-apf__modal-overlay {
	position: absolute;
	inset: 0;
	background: var(--apf-backdrop);
	cursor: pointer;
}

/* Stage holds the panel and stays centered. Its width leaves clear room on
   each side so the screen-edge controls never overlap the panel. */
.shiksite-apf__modal-stage {
	position: relative;
	z-index: 2;
	display: flex;
	width: min(1180px, calc(100vw - 380px));
	max-height: calc(100vh - 48px);
}

/* Controls anchored to the SCREEN edges (relative to the modal viewport),
   not to the panel. Tools = top-left of screen, PDF = top-right of screen. */
.shiksite-apf__modal-tools {
	position: absolute;
	top: 24px;
	left: 24px;
	z-index: 4;
	direction: ltr;       /* keep icon order fixed regardless of widget dir */
	display: flex;
	flex-direction: row-reverse;
	gap: 1.2rem;
}

.shiksite-apf__pdf-btn {
	position: absolute;
	top: 24px;
	right: 24px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	padding: 10px 22px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	background: var(--apf-btn-bg);
	color: var(--apf-btn-text);
	border: 1px solid var(--apf-btn-border);
	border-radius: 0 !important;
}

.shiksite-apf__modal-panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: calc(100vh - 48px);
	background: var(--apf-overlay-bg);
	border-radius: var(--apf-radius);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}

.shiksite-apf__pdf-btn:hover {
	filter: brightness(0.96);
}

.shiksite-apf__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: var(--apf-btn-bg);
	color: var(--apf-btn-text);
	border: 1px solid var(--apf-btn-border);
	border-radius: 0 !important;
	cursor: pointer;
	line-height: 1;
}

.shiksite-apf__icon-btn:hover {
	filter: brightness(0.96);
}

.shiksite-apf__icon-btn svg {
	display: block;
  width: 100%;
    height: 100%;
    margin: 3px;
}

.shiksite-apf__modal-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	padding: 24px;
	text-align: center;
	-webkit-overflow-scrolling: touch;
}

.shiksite-apf__modal-img {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	height: auto;
	user-select: none;
	-webkit-user-drag: none;
}

.shiksite-apf__modal-body.is-zoomed {
	cursor: grab;
}

.shiksite-apf__modal-body.is-zoomed.is-grabbing {
	cursor: grabbing;
}

body.shiksite-apf-no-scroll {
	overflow: hidden;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.shiksite-apf__building { font-size: 19px; padding: 9px 26px; }
	.shiksite-apf__apt { font-size: 17px; }
	.shiksite-apf__model { font-size: 19px; }
}

/* Tablet / mobile: panel fills the width; pull the screen-edge controls in
   to small insets so they sit at the panel's top corners. */
@media (max-width: 900px) {
	.shiksite-apf__modal { padding: 0; }

	.shiksite-apf__modal-stage {
		width: 100vw;
		max-height: 100vh;
		height: 100%;
	}

	.shiksite-apf__modal-panel {
		max-height: 100vh;
		height: 100%;
		border-radius: 0;
	}

	.shiksite-apf__modal-tools {
		top: 10px;
		left: 10px;
	}

	.shiksite-apf__pdf-btn {
		top: 10px;
		right: 10px;
		padding: 8px 14px;
		font-size: 14px;
	}

	.shiksite-apf__modal-body { padding: 64px 12px 16px; }
}

@media (max-width: 767px) {
	.shiksite-apf__buildings { margin-bottom: 18px; }
	.shiksite-apf__apartments { margin-bottom: 14px; }
	.shiksite-apf__building { font-size: 15px; padding: 8px 16px; }
	.shiksite-apf__apt { font-size: 14px; }
	.shiksite-apf__model { font-size: 16px; }

	.shiksite-apf__icon-btn { width: 36px; height: 36px; }
	.shiksite-apf__pdf-btn { padding: 7px 12px; font-size: 13px; }

	/* Mobile only: drop the floor-plan panel below the controls. */
	.shiksite-apf__modal { align-items: flex-start; }
	.shiksite-apf__modal-stage {
		margin-top: 20vw;
		height: calc(100vh - 20vw);
		max-height: calc(100vh - 20vw);
	}
	.shiksite-apf__modal-body { padding-top: 16px; }
}