/* UX pack part B (2026-11-24). Layout and state only; motion belongs to part C
   (stage/motion.css). Shared values: 160/240/300ms, enter cubic-bezier(.2,.7,.3,1). */

/* Goal gradient: the step bar is shown in the approved layout too. Width comes from the
   wizard (#wizFill); --wiz-progress mirrors it as 0..1. */
/* It sits on the header's bottom edge (absolute), so the sticky header keeps its height and
   nothing below moves or re-times its scroll (scripts/continue-to-room-browser-smoke.cjs). */
.ux-laws.approved-studio #wiz .wiz-head .wiz-bar{display:block!important;position:absolute;left:0;right:0;bottom:-1px;height:3px;margin:0;border-radius:0;background:var(--ui-gray-100,#eceef0);overflow:hidden}
.ux-laws.approved-studio #wiz .wiz-bar i{background:var(--ui-accent,#1a56db)}

/* Chunking: Restyle/Renovate waits for a room. Taken out of the layout, not left as an empty gap. */
#studioChoiceBar.ux-room-pending .structure-choices,#studioChoiceBar.ux-room-pending #structureNote{display:none}

/* Words never split (review, 2026-11-24). css/button-labels.css lets every button break a word
   anywhere, so a squeezed toggle read "Exterio / r". In Studio a word only moves whole to the next
   line, and a control in a row keeps at least its longest word, so the row grows instead. */
html.ux-laws :is(button,.btn,.authbtn,[role=button],[role=tab]){overflow-wrap:break-word;word-break:normal;hyphens:manual}
/* Korean puts spaces between words but browsers break Hangul between any two syllables (가구 / 는). */
html.ux-laws[lang=ko] :is(button,.btn,.authbtn,[role=button],[role=tab]){word-break:keep-all}
/* While the return card shows on phone and iPad, the photo is a little shorter so the room menu
   stays clear of the Continue bar fixed at the bottom (mobile-consumer.css). */
@media(max-width:899px){html.ux-laws #wiz:has(.ux-resume-card) #wizPhotoContextImage{max-height:36vh}}
@media(max-width:599px){html.ux-laws #wiz:has(.ux-resume-card) #wizPhotoContextImage{max-height:19vh}.ux-finish{gap:8px;margin:8px 0 4px;padding:12px}.ux-finish h2{font-size:16px!important}.ux-finish p{font-size:13px;line-height:1.35}}
/* Inside/Outside sits above the room menu, each the full width, so neither is squeezed and the
   menu shows its whole line ("Elige tu habitación o zona") at phone, iPad and desktop widths. */
html.ux-laws.approved-studio .studio-space-row{grid-template-columns:minmax(0,1fr);gap:10px}
html.ux-laws.approved-studio .studio-context-label,html.ux-laws.approved-studio #studioContextSelect{width:100%;min-width:0}

/* Zeigarnik: the return card. One quiet card; the step's own Continue stays the one blue button. */
.ux-finish{display:grid;gap:12px;margin:12px 0 4px;padding:14px;border:1px solid var(--ui-border,#d7dadd);border-radius:14px;background:var(--ui-surface,#fff)}
.ux-finish-copy{min-width:0}
.ux-finish h2{margin:0 0 4px!important;font:700 17px/1.3 Inter,system-ui,sans-serif}
.ux-finish p{margin:0;font-size:14px;line-height:1.4;color:var(--ui-secondary,#526178)}
.ux-finish-actions{display:flex;gap:8px;flex-wrap:wrap}
.ux-finish-actions button{min-height:44px;padding:10px 16px;border-radius:var(--ui-control-radius,10px);font:600 15px/1.2 Inter,system-ui,sans-serif;cursor:pointer}
.ux-finish-go{flex:1;border:1.5px solid var(--ui-accent,#1a56db);background:var(--ui-surface,#fff);color:var(--ui-accent,#1a56db)}
.ux-finish-over{border:0;background:none;color:var(--ui-secondary,#526178);text-decoration:underline;text-underline-offset:3px}

/* Proximity: one block at the end of the last step. */
.ux-final-title{margin:22px 0 8px;padding-top:16px;border-top:1px solid var(--ui-border,#e3e6ea);font:700 15px/1.3 Inter,system-ui,sans-serif;color:var(--ui-text,#141414)}
.ux-final-grouped .ux-final-title~.auth-before-create,.ux-final-grouped .ux-final-title~.guest-before-create{margin:0 0 8px;font-size:13.5px;color:var(--ui-secondary,#526178)}
.ux-final-grouped [data-ux-duplicate]{display:none!important} /* the same terms line now sits right under Create (stage/ux-studio.js) */
.ux-final-grouped .ux-final-title~button+.auth-terms{margin:10px 0 0;font-size:12.5px;color:var(--ui-secondary,#526178)}

/* Fitts: small Close buttons get a 44 x 44 touch area. */
:is(.product-x,.inspo-close,#productClose,#looksClose,#shareClose,#brandClose,#editClose,#upClose,.app-screen [id$="Close"],.pw-x,.help-chat-close,.feedback-close,.reno-dialog-heading>button){min-width:44px;min-height:44px}

/* Doherty: every tap answers at once with a pressed look (no transition, so it shows
   on the next frame). */
.ux-laws :is(#wiz,#nativeCreateResult,#currentDesign,.sample-room,.native-tabs,.app-tabs) :is(button,.visual-card,[role=button]):not(:disabled):active{filter:brightness(.93)}
.ux-laws :is(.wiz-go,.native-primary,.reno-continue,#decorPresetContinue):not(:disabled):active{filter:brightness(.88)}

/* Peak-end: when the image is ready, it comes first and large, right under the title. */
#currentDesign:has(#currentDesignImages img){display:flex;flex-direction:column}
/* The app moves the card into #nativeCreateResult with display:block!important (native-shell.css). */
html.ux-laws body #nativeCreateResult #currentDesign:has(#currentDesignImages img):not([hidden]){display:flex!important;flex-direction:column}
#currentDesign:has(#currentDesignImages img)>*{order:3}
#currentDesign:has(#currentDesignImages img)>h2{order:1}
#currentDesign:has(#currentDesignImages img)>#currentDesignImages{order:2;margin-bottom:6px}
#currentDesign:has(#currentDesignImages img)>[hidden]{display:none}
.ux-saved{position:fixed;left:16px;right:16px;bottom:calc(var(--mobile-nav-height,0px) + env(safe-area-inset-bottom) + 16px);z-index:2147483000;max-width:440px;margin:0 auto;padding:12px 16px;border-radius:12px;background:#17233a;color:#fff;font:600 14px/1.4 Inter,system-ui,sans-serif;text-align:center;box-shadow:0 8px 24px #0003}
.ux-saved[hidden]{display:none}
.ux-saved::before{content:'✓ ';font-weight:700}

/* Von Restorff: one blue button per screen. Ideas showed a blue "Try this" on every card;
   on the list they are outlined, and the one "Try this on my room" in an idea's detail stays blue. */
html.ux-laws #inspirationBrowser :is(.inspo-tile,.inspo-style-pair) .inspo-try{background:var(--ui-surface,#fff)!important;color:var(--ui-accent,#1a56db)!important;border:1.5px solid var(--ui-accent,#1a56db)!important}
