/* Rabin-Interiors & Woods: Style Switcher. Themed through the --riw-* variables in core.css.
   --pos (on the view) is where the divider sits; the designed room is clipped to the right of it. */

.riw-switch { display: grid; grid-template-columns: 1.45fr .55fr; gap: 20px; align-items: start; }

/* Style tabs */
.riw-switch-tabs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.riw-switch-tabs button { padding: .65rem 1.2rem; border-radius: 999px; border: 1px solid var(--riw-line-strong); background: var(--riw-card); color: var(--riw-text); font-size: .88rem; font-weight: 600; line-height: 1.2; cursor: pointer; transition: all .25s; }
.riw-switch-tabs button:hover { border-color: var(--riw-accent); }
.riw-switch-tabs button.is-on { background: var(--riw-ink); color: #f6f1e9; border-color: var(--riw-ink); }
.riw--dark .riw-switch-tabs button.is-on { background: var(--riw-accent-soft); color: #1c1712; border-color: var(--riw-accent-soft); }

/* Comparison view */
.riw-switch-view { --pos: 38%; position: relative; aspect-ratio: 5 / 3; border-radius: var(--riw-radius); overflow: hidden; background: #b9b6b1; cursor: ew-resize; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.riw-switch-bare, .riw-switch-done { position: absolute; inset: 0; }
.riw-switch-done { clip-path: inset(0 0 0 var(--pos)); }
.riw-switch-layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; transition: opacity .5s; }
.riw-switch-layer.is-in { opacity: 0; }
.riw-switch-svg * { transition: fill .7s; }
.riw-switch-lbl { position: absolute; top: 14px; z-index: 2; padding: .4rem .75rem; border-radius: 999px; background: rgba(21,18,15,.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #f6f1e9; font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; line-height: 1.3; pointer-events: none; }
.riw-switch-lbl--l { left: 14px; }
.riw-switch-lbl--r { right: 14px; }
.riw-switch-knob { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; z-index: 3; outline: none; }
.riw-switch-knob::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; color: #1c1712; font-size: 1rem; font-weight: 700; line-height: 46px; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.riw-switch-knob:focus-visible::after { box-shadow: 0 0 0 3px var(--riw-accent), 0 6px 20px rgba(0,0,0,.35); }

/* Side panel: one pane per style */
.riw-switch-side { background: var(--riw-card); border: 1px solid var(--riw-line); border-radius: var(--riw-radius); padding: 1.6rem; }
.riw-switch-pane { display: flex; flex-direction: column; gap: 1.2rem; }
.riw-switch-pane[hidden] { display: none; }
.riw-switch-pane h3 { font-size: clamp(1.8rem, 2.6vw, 2.4rem); margin-top: .5rem; }
.riw-switch-pane h3 em { font-style: normal; color: var(--riw-accent); }
.riw-switch-pane p { color: var(--riw-muted); font-size: .92rem; line-height: 1.6; }
.riw-switch-pane h4 { font-family: var(--riw-font-display); font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; color: var(--riw-muted); font-weight: 600; line-height: 1.4; margin-bottom: .6rem; }
.riw-switch-pal { display: flex; height: 40px; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--riw-line); }
.riw-switch-pal span { flex: 1; }
.riw .riw-switch-mat { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .88rem; }
.riw-switch-mat li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .5rem; border-bottom: 1px dashed var(--riw-line-strong); }
.riw-switch-mat li b { font-weight: 500; color: var(--riw-muted); }
.riw-switch-mat li span { text-align: right; }
.riw-switch-cost b { display: block; font-family: var(--riw-font-display); font-size: clamp(1.6rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.riw-switch-cost small { display: block; margin-top: .35rem; font-size: .76rem; color: var(--riw-muted); line-height: 1.45; }
.riw-switch-cta { margin-top: .2rem; }

@media (max-width: 1100px) {
	.riw-switch { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
	.riw-switch-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px 2px; }
	.riw-switch-tabs button { flex: none; }
	.riw-switch-view { aspect-ratio: 4 / 3; }
	.riw-switch-lbl { top: 10px; font-size: .6rem; }
	.riw-switch-side { padding: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
	.riw-switch * { transition: none !important; }
}
