/* Bottega Internal Configurator — login form, buttons, responsive Roomle frame.
 *
 * Colours and fonts are taken from the site's Elementor global kit, so the
 * internal area follows the brand automatically. The literal values are only
 * fallbacks for the case where the kit variables are not present.
 */

.bl-login,
.bl-configurator {
	--bl-bg: var(--e-global-color-primary, #2D2926);
	--bl-on-bg: var(--e-global-color-6e2b871, #FFFFFF);
	--bl-accent: var(--e-global-color-accent, #D87E36);
	--bl-soft: var(--e-global-color-7423c41, #DCD1CA);
	--bl-heading: var(--e-global-typography-primary-font-family, "Fahkwang"), sans-serif;
	--bl-body: var(--e-global-typography-text-font-family, "Montserrat"), sans-serif;
}

/* The configurator page is a plain WordPress page, so nothing else paints its
   background dark the way the Elementor internal pages do. */
body.bl-internal {
	background-color: var(--e-global-color-primary, #2D2926);
}

/* --- Login ---------------------------------------------------------------- */

.bl-login {
	display: flex;
	justify-content: center;
	padding: 60px 20px;
	font-family: var(--bl-body);
}

.bl-login__box {
	width: 100%;
	max-width: 420px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 40px 34px;
	border: 1px solid rgba(45, 41, 38, .15);
	background: #fff;
}

.bl-login__title {
	margin: 0 0 6px;
	font-family: var(--bl-heading);
	font-size: 24px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-align: center;
	color: var(--e-global-color-primary, #2D2926);
}

.bl-login__note {
	margin: 0 0 10px;
	text-align: center;
}

.bl-login__msg {
	margin: 0;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.4;
}

.bl-login__msg--error {
	background: #fdecec;
	color: #8f1d1d;
	border-left: 3px solid #c0392b;
}

.bl-login__msg--ok {
	background: #eef7ee;
	color: #205c20;
	border-left: 3px solid #4c9a4c;
}

.bl-login__label {
	margin-top: 8px;
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--e-global-color-ff5df61, #4D4D4D);
}

.bl-login__input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid rgba(45, 41, 38, .25);
	background: #fff;
	font-family: var(--bl-body);
	font-size: 15px;
	line-height: 1.3;
}

.bl-login__input:focus {
	outline: 2px solid var(--bl-accent);
	outline-offset: 1px;
}

.bl-login__remember {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0 4px;
	font-size: 14px;
}

.bl-login__lost {
	margin-top: 4px;
	font-size: 13px;
	text-align: center;
	text-decoration: underline;
}

.bl-login__submit {
	margin-top: 14px;
	width: 100%;
}

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

.bl-btn {
	display: inline-block;
	padding: 13px 22px;
	border: 1px solid currentColor;
	font-family: var(--bl-body);
	font-size: 13px;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

/* Scoped to the plugin's own containers so Elementor's global button styles,
   which load after this sheet, do not repaint them. */
.bl-login .bl-btn--primary,
.bl-configurator .bl-btn--primary,
a.bl-btn--primary,
button.bl-btn--primary {
	background: var(--e-global-color-primary, #2D2926);
	border-color: var(--e-global-color-primary, #2D2926);
	color: #fff;
}

.bl-login .bl-btn--primary:hover,
.bl-login .bl-btn--primary:focus,
.bl-configurator .bl-btn--primary:hover,
.bl-configurator .bl-btn--primary:focus,
a.bl-btn--primary:hover,
button.bl-btn--primary:hover {
	background: var(--e-global-color-accent, #D87E36);
	border-color: var(--e-global-color-accent, #D87E36);
	color: #fff;
}

.bl-btn--ghost {
	background: transparent;
	color: inherit;
}

.bl-configurator .bl-btn--ghost {
	color: var(--bl-soft);
	border-color: rgba(220, 209, 202, .45);
}

.bl-configurator .bl-btn--ghost:hover,
.bl-configurator .bl-btn--ghost:focus {
	background: var(--bl-accent);
	border-color: var(--bl-accent);
	color: #fff;
}

/* --- Roomle configurator -------------------------------------------------- */

.bl-configurator {
	--bl-configurator-height: min(88vh, 1080px);
	width: 100%;
	max-width: 1760px;
	margin: 0 auto;
	/* The site header overlays the top of the page, so the bar needs clearance.
	   Elementor pages use a flat 190px; here it scales with the viewport so a
	   short laptop screen does not spend a fifth of its height on empty padding.
	   The 140px floor still clears the logo. */
	padding: clamp(140px, 15vh, 190px) 24px 44px;
	box-sizing: border-box;
	font-family: var(--bl-body);
	color: var(--bl-on-bg);
}

.bl-configurator__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 16px;
}

.bl-configurator__title {
	margin: 0;
	font-family: var(--bl-heading);
	font-size: clamp(26px, 3vw, 42px);
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--bl-on-bg);
}

.bl-configurator__frame {
	position: relative;
	width: 100%;
	height: var(--bl-configurator-height);
	min-height: 520px;
	border: 1px solid rgba(220, 209, 202, .25);
	background: #fff;
	overflow: hidden;
}

.bl-configurator__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

@media (max-width: 1024px) {
	.bl-configurator {
		--bl-configurator-height: 82vh;
		padding: clamp(140px, 15vh, 190px) 16px 36px;
	}
}

@media (max-width: 767px) {
	.bl-configurator {
		--bl-configurator-height: 82vh;
		padding: 190px 12px 28px;
	}

	.bl-configurator__frame {
		min-height: 420px;
	}

	.bl-configurator__bar {
		flex-direction: column;
		align-items: flex-start;
	}

	.bl-configurator__back {
		width: 100%;
	}
}


/* ==========================================================================
   Full-viewport configurator
   ==========================================================================
   The configurator pages run on Elementor Canvas, so there is no site header
   or footer to leave room for: the Roomle frame takes the whole screen.

   Four treatments are on trial, one per test product, so the client can pick a
   favourite. They differ only in where the way back lives:

     --style-overlay   a pill floating over the top-right corner
     --style-topbar    a slim solid bar above the frame
     --style-rail      a vertical rail down the left edge
     --style-minimal   a round button that expands to a label on hover

   These rules sit last in the file on purpose: they share their specificity
   with the responsive blocks above and must win over them.
   ========================================================================== */

body.bl-configurator-page {
	overflow: hidden;
}

.bl-configurator--full {
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	padding: 0;
	background: var(--bl-bg);
}

.bl-configurator--full .bl-configurator__frame {
	flex: 1 1 auto;
	height: auto;
	min-height: 0;
	border: 0;
}

.bl-configurator--full .bl-configurator__bar {
	flex: 0 0 auto;
	margin: 0;
}

.bl-configurator__back-icon {
	display: inline-block;
}

/* --- Loading veil --------------------------------------------------------
   Roomle takes a moment to boot its 3D scene. Without this the frame is a
   blank white rectangle and the page reads as broken. */

.bl-configurator__loading {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	background: #fff;
	transition: opacity .45s ease;
}

.bl-configurator__loading.is-done {
	opacity: 0;
	pointer-events: none;
}

.bl-configurator__spinner {
	width: 34px;
	height: 34px;
	border: 2px solid rgba(45, 41, 38, .18);
	border-top-color: var(--e-global-color-accent, #D87E36);
	border-radius: 50%;
	animation: bl-spin .8s linear infinite;
}

.bl-configurator__loading-text {
	font-family: var(--bl-body);
	font-size: 12px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--e-global-color-ff5df61, #4D4D4D);
}

@keyframes bl-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.bl-configurator__spinner {
		animation-duration: 2.4s;
	}
}

/* --- A. Overlay: floating pill, always visible ---------------------------
   Costs no layout space at all. Sits in the one corner the Roomle UI keeps
   free of controls. */

.bl-configurator--style-overlay .bl-configurator__bar {
	position: absolute;
	top: 14px;
	right: 16px;
	z-index: 5;
	width: auto;
	gap: 0;
	flex-direction: row;
}

.bl-configurator--style-overlay .bl-configurator__title {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.bl-configurator--style-overlay .bl-configurator__back {
	width: auto;
	padding: 9px 16px;
	font-size: 11px;
	color: #fff;
	background: rgba(45, 41, 38, .82);
	border-color: rgba(220, 209, 202, .45);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.bl-configurator--style-overlay .bl-configurator__back-icon {
	margin-right: 8px;
}

/* --- B. Top bar: nothing overlaps the configurator -----------------------
   The safest of the four: the Roomle canvas keeps every pixel of its own
   viewport, at the cost of a 54px strip. */

.bl-configurator--style-topbar .bl-configurator__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 54px;
	padding: 0 18px;
	background: var(--bl-bg);
	border-bottom: 1px solid rgba(220, 209, 202, .18);
}

.bl-configurator--style-topbar .bl-configurator__title {
	font-size: 15px;
	letter-spacing: .22em;
}

.bl-configurator--style-topbar .bl-configurator__back {
	width: auto;
	flex: 0 0 auto;
	padding: 8px 15px;
	font-size: 11px;
}

.bl-configurator--style-topbar .bl-configurator__back-icon {
	margin-right: 8px;
}

/* --- C. Rail: vertical strip down the left edge --------------------------
   Costs 66px of width, which a wide screen has to spare and a tall Roomle
   panel does not. The product name is set along the rail. */

.bl-configurator--style-rail {
	flex-direction: row;
}

.bl-configurator--style-rail .bl-configurator__bar {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 26px;
	width: 66px;
	height: 100%;
	padding: 16px 0;
	background: var(--bl-bg);
	border-right: 1px solid rgba(220, 209, 202, .18);
}

.bl-configurator--style-rail .bl-configurator__title {
	order: 2;
	margin: 0;
	font-size: 13px;
	letter-spacing: .3em;
	white-space: nowrap;
	writing-mode: vertical-rl;
	color: var(--bl-soft);
}

.bl-configurator--style-rail .bl-configurator__back {
	order: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	font-size: 16px;
}

.bl-configurator--style-rail .bl-configurator__back-label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* --- D. Minimal: round button that expands on hover ----------------------
   The most immersive of the four. At rest it is a 40px disc; hover or keyboard
   focus slides the label out, so the control is discoverable without ever
   occupying the screen. */

.bl-configurator--style-minimal .bl-configurator__bar {
	position: absolute;
	top: 14px;
	right: 16px;
	z-index: 5;
	width: auto;
	gap: 0;
	flex-direction: row;
}

.bl-configurator--style-minimal .bl-configurator__title {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.bl-configurator--style-minimal .bl-configurator__back {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 40px;
	height: 40px;
	padding: 0 11px;
	border-radius: 20px;
	overflow: hidden;
	white-space: nowrap;
	font-size: 11px;
	color: #fff;
	background: rgba(45, 41, 38, .78);
	border-color: rgba(220, 209, 202, .4);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	transition: width .28s cubic-bezier(.4, 0, .2, 1), background-color .2s ease;
}

.bl-configurator--style-minimal .bl-configurator__back-icon {
	flex: 0 0 auto;
	font-size: 15px;
	line-height: 1;
}

.bl-configurator--style-minimal .bl-configurator__back-label {
	flex: 0 0 auto;
	max-width: 0;
	margin-left: 0;
	opacity: 0;
	transition: max-width .28s cubic-bezier(.4, 0, .2, 1), opacity .18s ease, margin-left .28s ease;
}

.bl-configurator--style-minimal .bl-configurator__back:hover,
.bl-configurator--style-minimal .bl-configurator__back:focus-visible {
	width: 178px;
	justify-content: flex-start;
}

.bl-configurator--style-minimal .bl-configurator__back:hover .bl-configurator__back-label,
.bl-configurator--style-minimal .bl-configurator__back:focus-visible .bl-configurator__back-label {
	max-width: 140px;
	margin-left: 9px;
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.bl-configurator--style-minimal .bl-configurator__back,
	.bl-configurator--style-minimal .bl-configurator__back-label {
		transition: none;
	}
}

/* --- Small screens -------------------------------------------------------
   The rail and the top bar both cost fixed space that a phone cannot spare,
   so below 767px every style collapses to the overlay treatment. */

@media (max-width: 767px) {
	.bl-configurator--style-rail {
		flex-direction: column;
	}

	.bl-configurator--style-rail .bl-configurator__bar,
	.bl-configurator--style-topbar .bl-configurator__bar,
	.bl-configurator--style-overlay .bl-configurator__bar,
	.bl-configurator--style-minimal .bl-configurator__bar {
		position: absolute;
		top: 8px;
		right: 8px;
		z-index: 5;
		flex-direction: row;
		width: auto;
		height: auto;
		padding: 0;
		background: none;
		border: 0;
	}

	.bl-configurator--style-rail .bl-configurator__title,
	.bl-configurator--style-topbar .bl-configurator__title {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
		writing-mode: horizontal-tb;
	}

	.bl-configurator--style-rail .bl-configurator__back,
	.bl-configurator--style-topbar .bl-configurator__back,
	.bl-configurator--style-overlay .bl-configurator__back,
	.bl-configurator--style-minimal .bl-configurator__back {
		width: auto;
		height: auto;
		padding: 8px 13px;
		border-radius: 0;
		font-size: 10px;
		color: #fff;
		background: rgba(45, 41, 38, .85);
	}

	.bl-configurator--style-rail .bl-configurator__back-label {
		position: static;
		width: auto;
		height: auto;
		margin: 0 0 0 8px;
		clip-path: none;
	}

	.bl-configurator--style-minimal .bl-configurator__back-label {
		max-width: none;
		margin-left: 8px;
		opacity: 1;
	}
}
