/* Anadara Studio — "See it on your wall" room preview.
   Uses the theme colour custom properties from style.css. */

.room-preview-trigger {
	align-self: flex-start;
	margin-top: 0.6rem;
	padding: 0.35rem 0;
	background: none;
	border: none;
	border-bottom: 1px solid var(--color-ash);
	font-family: 'Jost', sans-serif;
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-ink);
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.room-preview-trigger:hover,
.room-preview-trigger:focus-visible {
	color: var(--color-terracotta);
	border-color: var(--color-terracotta);
}

.rp-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(26, 22, 18, 0.72);
}

.rp-modal {
	width: min(940px, 100%);
	max-height: 92vh;
	overflow: auto;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.25rem 1.4rem 1.5rem;
	background: var(--color-off-white);
	color: var(--color-ink);
	border-radius: 8px;
}

.rp-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}

.rp-title {
	margin: 0;
	font-family: 'Cormorant Garamond', serif;
	font-weight: 500;
	font-size: 1.45rem;
	letter-spacing: 0.02em;
}

.rp-title em { font-style: italic; }

.rp-close {
	background: none;
	border: none;
	font-size: 1.7rem;
	line-height: 1;
	color: var(--color-stone);
	cursor: pointer;
}

.rp-close:hover,
.rp-close:focus-visible { color: var(--color-terracotta); }

.rp-stage {
	position: relative;
	width: 100%;
	min-height: min(62vh, 460px);
	background: var(--color-fog);
	border-radius: 6px;
	overflow: hidden;
	touch-action: none;
}

.rp-drop {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	cursor: pointer;
	text-align: center;
	color: var(--color-stone);
}

.rp-drop-ic { font-size: 1.9rem; line-height: 1; }
.rp-drop-main { font-family: 'Jost', sans-serif; font-size: 0.95rem; }
.rp-drop-sub { font-size: 0.78rem; color: var(--color-ash); }
.rp-drop-on { outline: 2px dashed var(--color-terracotta); outline-offset: -10px; }
.rp-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.rp-room {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
}

.rp-art {
	position: absolute;
	top: 0;
	left: 0;
	cursor: grab;
	user-select: none;
	-webkit-user-drag: none;
	will-change: transform;
}

.rp-art.rp-grabbing { cursor: grabbing; }

.rp-handle {
	position: absolute;
	top: -9px;
	left: -9px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--color-terracotta);
	border: 2px solid var(--color-white);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
	cursor: nwse-resize;
	touch-action: none;
	opacity: 0;
	transition: opacity 0.15s ease;
}

/* Reveal the resize handle only while hovering the painting or the handle
   itself. The handle overlaps the frame corner, so the cursor never falls
   into a gap when moving from one to the other. */
.rp-art:hover ~ .rp-handle,
.rp-handle:hover,
.rp-handle.rp-resizing { opacity: 1; }

/* Touch devices have no hover — keep the handle visible so it stays usable. */
@media (hover: none) {
	.rp-handle { opacity: 1; }
}

.rp-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.9rem 1.6rem;
}

.rp-row { display: flex; align-items: center; gap: 0.55rem; }

.rp-lab {
	font-family: 'Jost', sans-serif;
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	color: var(--color-stone);
	white-space: nowrap;
}

.rp-num {
	width: 5rem;
	padding: 0.4rem 0.5rem;
	font-family: 'Jost', sans-serif;
	font-size: 0.9rem;
	color: var(--color-ink);
	border: 1px solid var(--color-ash);
	border-radius: 3px;
	background: var(--color-white);
}

.rp-unit { font-size: 0.8rem; color: var(--color-stone); }
.rp-slider { width: 9rem; accent-color: var(--color-terracotta); }

.rp-toggle {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-family: 'Jost', sans-serif;
	font-size: 0.82rem;
	color: var(--color-stone);
	cursor: pointer;
}

.rp-toggle input { accent-color: var(--color-terracotta); }

.rp-btns { display: flex; gap: 0.6rem; margin-left: auto; }

.rp-primary,
.rp-ghost {
	font-family: 'Jost', sans-serif;
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 0.62rem 1.15rem;
	border-radius: 2px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.rp-primary {
	background: var(--color-terracotta);
	border: 1px solid var(--color-terracotta);
	color: var(--color-white);
}

.rp-primary:hover,
.rp-primary:focus-visible { background: var(--color-terracotta-dark); border-color: var(--color-terracotta-dark); }

.rp-ghost {
	background: none;
	border: 1px solid var(--color-ash);
	color: var(--color-ink);
}

.rp-ghost:hover,
.rp-ghost:focus-visible { border-color: var(--color-stone); }

.rp-note {
	margin: 0;
	font-size: 0.74rem;
	line-height: 1.6;
	color: var(--color-ash);
}

@media (max-width: 560px) {
	.rp-btns { margin-left: 0; width: 100%; }
	.rp-btns .rp-primary, .rp-btns .rp-ghost { flex: 1; }
}
