/* Custom Home configurator (configurator.js). Own classes, because site.css only has the old site's Tailwind classes. */
.cfg-section { background: #fff; padding: 4rem 0; border-top: 1px solid #e7e5e4; }
.cfg-wrap { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 1024px) { .cfg-wrap { padding: 0 2.5rem; } }
.cfg-head { text-align: center; max-width: 42rem; margin: 0 auto 2.5rem; }
.cfg-eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .4em; text-transform: uppercase; color: #a8a29e; margin-bottom: .75rem; }
.cfg-title { font-family: 'Playfair Display', serif; font-size: 1.875rem; font-weight: 700; color: #1c1917; margin-bottom: .75rem; }
.cfg-sub { color: #78716c; font-size: .9375rem; line-height: 1.6; }

.cfg-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .cfg-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } .cfg-preview { position: sticky; top: 6rem; } }

/* controls */
.cfg-block { padding: 1.25rem 0; border-bottom: 1px solid #e7e5e4; }
.cfg-block:first-child { padding-top: 0; }
.cfg-label { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-weight: 700; color: #1c1917; font-size: .9375rem; margin-bottom: .875rem; }
.cfg-label span { width: 1.5rem; height: 1.5rem; border-radius: 999px; background: #1c1917; color: #fff; font-size: .75rem; display: inline-flex; align-items: center; justify-content: center; }
.cfg-label em { font-style: normal; font-weight: 400; font-size: .75rem; color: #a8a29e; }

.cfg-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 640px) { .cfg-styles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cfg-style { position: relative; border: 2px solid transparent; border-radius: .75rem; overflow: hidden; padding: 0; background: #e7e5e4; cursor: pointer; aspect-ratio: 4 / 3; transition: border-color .15s, transform .15s; }
.cfg-style img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cfg-style span { position: absolute; left: 0; right: 0; bottom: 0; padding: .9rem .4rem .3rem; font-size: .6875rem; font-weight: 600; line-height: 1.15; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.cfg-style:hover { transform: translateY(-1px); }
.cfg-style.is-on { border-color: #1c1917; box-shadow: 0 0 0 2px #fff inset; }

.cfg-size { display: flex; align-items: center; gap: 1rem; margin-bottom: .875rem; }
.cfg-size input[type=range] { flex: 1; accent-color: #1c1917; }
.cfg-size-val { white-space: nowrap; color: #57534e; font-size: .875rem; min-width: 6.5rem; text-align: right; }
.cfg-size-val strong { font-size: 1.25rem; color: #1c1917; }

.cfg-seg { display: inline-flex; background: #f5f5f4; border-radius: 999px; padding: .25rem; gap: .25rem; }
.cfg-seg-wrap { display: flex; flex-wrap: wrap; border-radius: 1rem; }
.cfg-seg button { border: 0; background: transparent; padding: .45rem 1rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; color: #57534e; cursor: pointer; }
.cfg-seg button.is-on { background: #1c1917; color: #fff; }

.cfg-steppers { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.cfg-stepper { display: flex; align-items: center; gap: .6rem; }
.cfg-stepper-label { font-size: .875rem; color: #57534e; min-width: 5.2rem; }
.cfg-step-btn { width: 2.1rem; height: 2.1rem; border-radius: 999px; border: 1px solid #d6d3d1; background: #fff; font-size: 1.1rem; line-height: 1; color: #1c1917; cursor: pointer; }
.cfg-step-btn:disabled { opacity: .35; cursor: default; }
.cfg-step-val { font-weight: 700; font-size: 1.125rem; min-width: 1.2rem; text-align: center; }

.cfg-checks { display: grid; gap: .5rem; }
.cfg-check { display: flex; align-items: center; gap: .65rem; padding: .65rem .8rem; border: 1px solid #e7e5e4; border-radius: .6rem; font-size: .875rem; color: #44403c; cursor: pointer; }
.cfg-check input { accent-color: #1c1917; width: 1rem; height: 1rem; flex-shrink: 0; }
.cfg-check span { flex: 1; }
.cfg-check b { font-weight: 600; color: #1c1917; white-space: nowrap; }
.cfg-check:has(input:checked) { border-color: #1c1917; background: #fafaf9; }
.cfg-check.is-off { opacity: .5; cursor: not-allowed; }

.cfg-hint { font-size: .8125rem; color: #b45309; margin-top: .6rem; }
.cfg-hint:empty { display: none; }
.cfg-note { font-size: .75rem; color: #a8a29e; line-height: 1.5; margin-top: .6rem; }

/* preview */
.cfg-tabs { display: flex; gap: .25rem; border-bottom: 1px solid #e7e5e4; margin-bottom: 1rem; }
.cfg-tabs button { border: 0; background: none; padding: .7rem 1rem; font-size: .8125rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #a8a29e; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.cfg-tabs button.is-on { color: #1c1917; border-bottom-color: #1c1917; }
.cfg-tabs button { white-space: nowrap; }
@media (max-width: 480px) { .cfg-tabs button { padding: .7rem .55rem; font-size: .72rem; letter-spacing: .02em; } }
@media (min-width: 1024px) { .cfg-view { min-height: 16rem; } }
.cfg-plan { background: #fff; border: 1px solid #e7e5e4; border-radius: 1rem; padding: .75rem; }
.cfg-plan-svg { width: 100%; height: auto; display: block; font-family: 'DM Sans', system-ui, sans-serif; }
.cfg-svg-title { font-size: 20px; font-weight: 700; fill: #1c1917; }
.cfg-svg-room { font-weight: 600; fill: #292524; }
.cfg-svg-sub { fill: #78716c; }
.cfg-svg-note { font-size: 16px; font-weight: 600; fill: #57534e; }

.cfg-photo { margin: 0; border-radius: 1rem; overflow: hidden; background: #f5f5f4; }
.cfg-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.cfg-photo figcaption { font-size: .75rem; color: #78716c; padding: .6rem .9rem; }

.cfg-ai { border: 1px dashed #d6d3d1; border-radius: 1rem; padding: 2.5rem 1.5rem; text-align: center; color: #57534e; font-size: .875rem; line-height: 1.6; }
.cfg-ai-title { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 700; color: #1c1917; margin-bottom: .5rem; }
.cfg-ai-wait { display: flex; flex-direction: column; align-items: center; gap: 1rem; min-height: 16rem; justify-content: center; }
.cfg-ai-wait small { color: #a8a29e; }
.cfg-ai-actions { margin-top: .75rem; text-align: right; }
.cfg-spin { width: 2.5rem; height: 2.5rem; border: 3px solid #e7e5e4; border-top-color: #1c1917; border-radius: 999px; animation: cfg-spin .9s linear infinite; }
@keyframes cfg-spin { to { transform: rotate(360deg); } }
.cfg-btn { margin-top: 1rem; border: 1px solid #1c1917; background: #fff; color: #1c1917; padding: .65rem 1.4rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.cfg-btn:hover { background: #1c1917; color: #fff; }

.cfg-price { margin-top: 1.25rem; background: #1c1917; color: #e7e5e4; border-radius: 1rem; padding: 1.5rem; }
.cfg-price-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.cfg-price-head span { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: #a8a29e; font-weight: 600; }
.cfg-price-head strong { font-family: 'Playfair Display', serif; font-size: 2rem; color: #fff; }
.cfg-price ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid #44403c; }
.cfg-price li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; font-size: .8125rem; border-bottom: 1px solid #292524; }
.cfg-price li span:last-child { white-space: nowrap; color: #fff; }
.cfg-price .cfg-note { color: #a8a29e; }
.cfg-cta { margin-top: 1rem; width: 100%; border: 0; background: #fff; color: #1c1917; padding: .9rem 1rem; font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; border-radius: .5rem; }
.cfg-cta:hover { background: #f5f5f4; }

/* panels */
.cfg-panel[hidden] { display: none; }
.cfg-seg button:disabled { opacity: .35; cursor: not-allowed; }

/* floor plan editor */
.cfg-plan { padding: 0; overflow: hidden; }
.pe-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .7rem .8rem; border-bottom: 1px solid #e7e5e4; background: #fafaf9; }
.pe-shapes { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.pe-shapes > span { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #a8a29e; margin-right: .2rem; }
.pe-shapes button, .pe-floors button, .pe-tools button { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #e7e5e4; background: #fff; border-radius: 999px; padding: .32rem .7rem; font-size: .75rem; font-weight: 600; color: #44403c; cursor: pointer; }
.pe-shapes svg { width: 22px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.pe-shapes button.is-on, .pe-floors button.is-on { background: #1c1917; border-color: #1c1917; color: #fff; }
.pe-shapes button:disabled { opacity: .4; cursor: not-allowed; }
.pe-floors { display: flex; gap: .3rem; }
.pe-floors:empty { display: none; }
.pe-tools { display: flex; gap: .3rem; margin-left: auto; }
.pe-tools button:disabled { opacity: .4; cursor: default; }
.pe-canvas { padding: .5rem; touch-action: none; user-select: none; -webkit-user-select: none; }
.pe-canvas svg { width: 100%; height: auto; display: block; max-height: 70vh; }
.pe-help { font-size: .75rem; color: #78716c; padding: 0 .9rem .7rem; line-height: 1.5; }
.pe-canvas.is-blueprint { background: #174a7c; }
.pe-check { border-top: 1px solid #e7e5e4; padding: .7rem .9rem .8rem; }
.pe-check-title { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #a8a29e; margin-bottom: .35rem; }
.pe-check ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.pe-check li { font-size: .78rem; line-height: 1.4; }
.pe-check li.ok { color: #15803d; }
.pe-check li.warn { color: #b91c1c; }
.pe-panel { display: none; border-top: 1px solid #e7e5e4; padding: .8rem .9rem; background: #fffbeb; }
.pe-panel.is-on { display: block; }
.pe-panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pe-panel-head input, .pe-panel-head select { border: 1px solid #d6d3d1; border-radius: .4rem; padding: .4rem .55rem; font-size: .85rem; background: #fff; color: #1c1917; }
.pe-panel-head input { flex: 1 1 10rem; min-width: 0; }
.pe-panel-head span { font-size: .8rem; color: #57534e; white-space: nowrap; }
.pe-panel-btns { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.pe-panel-btns button { border: 1px solid #1c1917; background: #fff; color: #1c1917; border-radius: .4rem; padding: .38rem .75rem; font-size: .75rem; font-weight: 600; cursor: pointer; }
.pe-panel-btns button:hover { background: #1c1917; color: #fff; }
.pe-panel-note { font-size: .75rem; color: #b45309; margin-top: .4rem; }
.pe-panel-note:empty { display: none; }
.pe-ghost { position: fixed; z-index: 200; pointer-events: none; background: #1c1917; color: #fff; font-size: .75rem; font-weight: 600; padding: .3rem .6rem; border-radius: .4rem; box-shadow: 0 4px 14px rgba(0,0,0,.2); white-space: nowrap; }

/* 3D viewer */
.cfg-3d { border: 1px solid #e7e5e4; border-radius: 1rem; overflow: hidden; background: linear-gradient(#9cc0e0, #e6edf1); }
.v3-stage { position: relative; min-height: 14rem; touch-action: none; }
.v3-stage canvas { display: block; width: 100% !important; cursor: grab; }
.v3-stage canvas:active { cursor: grabbing; }
.v3-loading { display: flex; align-items: center; justify-content: center; min-height: 16rem; color: #57534e; font-size: .875rem; }
.v3-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; padding: .6rem .7rem; background: #fafaf9; border-top: 1px solid #e7e5e4; }
.v3-views, .v3-modes { display: flex; flex-wrap: wrap; gap: .3rem; }
.v3-bar button { border: 1px solid #e7e5e4; background: #fff; border-radius: 999px; padding: .32rem .75rem; font-size: .75rem; font-weight: 600; color: #44403c; cursor: pointer; }
.v3-bar button:hover { border-color: #1c1917; }
.v3-bar button.is-on { background: #1c1917; border-color: #1c1917; color: #fff; }
.v3-bar button[hidden] { display: none; }
/* room list under the viewer (click a room to fly to it) */
.v3-roomlist { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .55rem .7rem .7rem; background: #fafaf9; border-top: 1px solid #f0efed; }
.v3-roomlist:empty { display: none; }
.v3-roomlist-k { font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #a8a29e; margin-right: .2rem; }
.v3-roomlist button { border: 1px solid #e7e5e4; background: #fff; border-radius: 999px; padding: .26rem .65rem; font-size: .72rem; font-weight: 600; color: #44403c; cursor: pointer; }
.v3-roomlist button em { font-style: normal; font-weight: 500; color: #a8a29e; margin-left: .15rem; }
.v3-roomlist button:hover, .v3-roomlist button:focus-visible { border-color: #1c1917; }
.v3-roomlist button.is-on { background: #f59e0b; border-color: #f59e0b; color: #1c1917; }
.v3-roomlist button.is-on em { color: #44403c; }
/* inside view: room card + hint */
.v3-room { position: absolute; left: .6rem; bottom: .6rem; width: min(18rem, calc(100% - 1.2rem)); box-sizing: border-box; padding: .8rem .9rem .7rem; background: rgba(255,255,255,.97); border-radius: .75rem; box-shadow: 0 8px 28px rgba(0,0,0,.22); font-size: .78rem; color: #44403c; }
.v3-room[hidden], .v3-hint[hidden] { display: none; }
.v3-room h4 { margin: .15rem 1.4rem .15rem 0; font-size: 1.02rem; font-weight: 700; color: #1c1917; line-height: 1.2; }
.v3-room-k { font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #b45309; }
.v3-room p { margin: 0 0 .4rem; line-height: 1.4; }
.v3-room .v3-room-size { font-weight: 600; color: #1c1917; margin-bottom: .3rem; }
.v3-room ul { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 .6rem; padding: 0; list-style: none; }
.v3-room li { background: #f5f5f4; border-radius: 999px; padding: .15rem .55rem; font-size: .68rem; font-weight: 600; color: #44403c; }
.v3-room-x { position: absolute; top: .3rem; right: .4rem; border: 0; background: none; font-size: 1.25rem; line-height: 1; padding: .2rem .4rem; color: #57534e; cursor: pointer; }
.v3-room-x:hover { color: #1c1917; }
.v3-room-nav { display: flex; justify-content: space-between; gap: .4rem; }
.v3-room-nav button { border: 1px solid #e7e5e4; background: #fff; border-radius: 999px; padding: .28rem .75rem; font-size: .72rem; font-weight: 600; color: #44403c; cursor: pointer; }
.v3-room-nav button:hover, .v3-room-nav button:focus-visible { border-color: #1c1917; }
.v3-hint { position: absolute; right: .6rem; top: .6rem; padding: .35rem .75rem; background: rgba(28,25,23,.78); color: #fff; font-size: .72rem; font-weight: 600; border-radius: 999px; pointer-events: none; }
@media (max-width: 480px) { .v3-room { font-size: .72rem; padding: .6rem .7rem .55rem; } .v3-room .v3-room-desc { display: none; } .v3-hint { font-size: .65rem; } }

/* exterior looks (photo + 3D materials) */
.cfg-looks { margin-top: .9rem; }
.cfg-looks-label { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #78716c; margin-bottom: .45rem; }
.cfg-looks-label em { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; color: #a8a29e; margin-left: .35rem; }
.cfg-looks-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.cfg-look { display: flex; align-items: center; gap: .6rem; padding: .35rem; border: 2px solid #e7e5e4; border-radius: .7rem; background: #fff; cursor: pointer; text-align: left; }
.cfg-look img { width: 4.2rem; height: 3rem; object-fit: cover; border-radius: .4rem; flex-shrink: 0; }
.cfg-look span { font-size: .72rem; line-height: 1.3; color: #44403c; }
.cfg-look.is-on { border-color: #1c1917; background: #fafaf9; }
.cfg-look:hover { border-color: #a8a29e; }

/* 3D view: style photo card in the corner */
.cfg-3d-wrap { position: relative; }
.cfg-ref { position: absolute; top: .6rem; left: .6rem; display: flex; flex-direction: column; gap: .25rem; padding: .3rem; background: rgba(255,255,255,.92); border: 0; border-radius: .6rem; box-shadow: 0 4px 16px rgba(0,0,0,.18); cursor: pointer; }
.cfg-ref img { width: 7.5rem; height: 4.6rem; object-fit: cover; border-radius: .4rem; display: block; }
.cfg-ref span { font-size: .65rem; font-weight: 700; color: #292524; text-align: left; padding: 0 .15rem .1rem; }
@media (max-width: 480px) { .cfg-ref img { width: 5.2rem; height: 3.3rem; } }

/* Style photo tab: photo and the configured house side by side */
.cfg-compare { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
@media (min-width: 640px) { .cfg-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cfg-compare figure { margin: 0; border-radius: 1rem; overflow: hidden; background: #f5f5f4; border: 1px solid #e7e5e4; }
.cfg-compare img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.cfg-compare figcaption { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #78716c; padding: .55rem .8rem; }
.cfg-still { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; background: #e4ecf2; }
.cfg-still img { aspect-ratio: auto; height: 100%; }
.cfg-photo-cap { font-size: .8rem; color: #57534e; line-height: 1.55; margin-top: .75rem; }

/* note in the request form */
.cfg-attached { display: flex; align-items: flex-start; gap: .75rem; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: .6rem; padding: .75rem 1rem; font-size: .8125rem; line-height: 1.5; margin-bottom: 1.25rem; }
.cfg-attached span { flex: 1; }
.cfg-attached button { border: 0; background: none; color: #065f46; font-size: 1.1rem; line-height: 1; cursor: pointer; }
