/* Urban Akali studio – shared extras for the 3D builder pages (see builder.js) */

/* ---------- the how-to hand ---------- */
.ubh{position:absolute;z-index:40;width:170px;margin-left:-85px;display:flex;flex-direction:column;align-items:center;pointer-events:none;opacity:0;transform:translateY(8px);transition:opacity .45s ease,transform .45s ease}
.ubh.is-on{opacity:1;transform:none}
.ubh.is-gone{opacity:0;transition:opacity .3s ease}
.ubh-arc{width:112px;height:28px;margin-bottom:-2px;stroke:#FBF9F4;filter:drop-shadow(0 0 2px rgba(0,0,0,.9));animation:ubhArc 5s ease-in-out infinite}
.ubh-hand{position:relative;width:70px;height:70px;filter:drop-shadow(0 3px 6px rgba(0,0,0,.25));animation:ubhHand 5s ease-in-out infinite}
.ubh-hand svg{width:100%;height:100%;display:block}
.ubh-dot{position:absolute;left:26px;top:0;width:14px;height:14px;border-radius:50%;background:rgba(168,135,79,.85);box-shadow:0 0 0 3px rgba(251,249,244,.9);opacity:0;animation:ubhD1 5s ease-in-out infinite}
.ubh-d2{animation-name:ubhD2}
.ubh-cap{position:relative;margin:8px 0 0;height:26px;width:170px}
.ubh-cap span{position:absolute;inset:0;margin:auto;width:max-content;height:26px;line-height:26px;padding:0 12px;border-radius:13px;background:rgba(17,17,17,.82);color:#F4F0E8;font:700 10px/26px 'DM Sans',sans-serif;letter-spacing:2px;text-transform:uppercase;white-space:nowrap}
.ubh-c1{animation:ubhC1 5s ease-in-out infinite}
.ubh-c2{opacity:0;animation:ubhC2 5s ease-in-out infinite}
@keyframes ubhHand{0%{transform:translateX(-30px)}20%{transform:translateX(30px)}40%{transform:translateX(-30px)}48%{transform:translateX(0) scale(1)}62%{transform:scale(.94)}80%{transform:scale(1.04)}100%{transform:translateX(-30px)}}
@keyframes ubhArc{0%,42%{opacity:1}48%,94%{opacity:0}100%{opacity:1}}
@keyframes ubhD1{0%,50%{opacity:0;transform:translate(0,0)}56%{opacity:1;transform:translate(-3px,3px)}82%{opacity:1;transform:translate(-20px,-14px)}90%,100%{opacity:0;transform:translate(-20px,-14px)}}
@keyframes ubhD2{0%,50%{opacity:0;transform:translate(0,0)}56%{opacity:1;transform:translate(3px,-3px)}82%{opacity:1;transform:translate(20px,-30px)}90%,100%{opacity:0;transform:translate(20px,-30px)}}
@keyframes ubhC1{0%,44%{opacity:1}50%,94%{opacity:0}100%{opacity:1}}
@keyframes ubhC2{0%,46%{opacity:0}52%,92%{opacity:1}98%,100%{opacity:0}}
/* mouse and trackpad: just drag to spin */
@media (hover:hover) and (pointer:fine){
  .ubh-hand{animation-name:ubhHandDesk}.ubh-arc,.ubh-c1{animation:none;opacity:1}.ubh-c2,.ubh-dot{display:none}
}
@keyframes ubhHandDesk{0%,100%{transform:translateX(-30px)}50%{transform:translateX(30px)}}
@media (prefers-reduced-motion:reduce){.ubh *{animation:none !important}.ubh-c2,.ubh-dot{display:none}.ubh-c1{opacity:1}}

/* ---------- pinch zoom on the garment builders (their 3D view is enlarged in place) ---------- */
body.ub-ua .ua-stg{overflow:hidden !important}
body.ub-ua .ua-stg canvas{transform:scale(var(--ub-z,1));transform-origin:50% 45%;transition:transform .08s linear}

/* ---------- garment builders on phones: extra sections the UA x JP page doesn't have ---------- */
@media (max-width:760px){
  body.ub-ua .ua-scroll2{justify-content:safe center !important}
  body.ub-ua .ua-o33,body.ub-ua .ua-o43{display:flex !important;align-items:center;justify-content:center;gap:12px;margin-top:26px !important;margin-bottom:0 !important;font-size:11px !important;letter-spacing:3px !important;text-align:center !important}
  body.ub-ua .ua-o33::before,body.ub-ua .ua-o33::after,body.ub-ua .ua-o43::before,body.ub-ua .ua-o43::after{content:"";flex:1;height:1px;background:rgba(17,17,17,.18)}
  body.ub-ua .ua-ink,body.ub-ua .ua-o34{justify-content:center !important}
  body.ub-ua .ua-o35{align-self:center !important;margin:14px auto 0 !important}
  body.ub-ua .ua-o36{text-align:center !important}
  body.ub-ua .ua-o44{margin:0 auto !important}
  body.ub-ua .ua-o5{margin-top:0 !important}
}

/* ---------- The Mala Studio on phones: centred and spaced out like UA x JP, no sliders ---------- */
@media (max-width:760px){
  body.ub-mala main{text-align:center}
  body.ub-mala .eyebrow,body.ub-mala h1{text-align:center}
  body.ub-mala .stg{height:min(100vw,440px) !important}
  body.ub-mala .spin{gap:4px !important}
  body.ub-mala #zin,body.ub-mala #zout{display:none !important}      /* pinch the mala instead */
  body.ub-mala .rot,body.ub-mala input[type=range]{display:none !important}
  body.ub-mala .lbl{display:flex !important;align-items:center;justify-content:center;gap:12px;margin-top:28px !important;text-align:center}
  body.ub-mala .lbl::before,body.ub-mala .lbl::after{content:"";flex:1;height:1px;background:rgba(17,17,17,.18)}
  body.ub-mala .bt{display:flex !important;flex-wrap:wrap;justify-content:center !important;gap:10px !important;margin-top:12px !important}
  body.ub-mala .bt .opt{min-height:46px}
  body.ub-mala .sw{justify-content:safe center !important}
  body.ub-mala .kh{display:flex !important;justify-content:center !important;gap:10px}
  body.ub-mala .chips{justify-content:safe center !important}
  body.ub-mala .sh .arr{display:none !important}
  body.ub-mala .strip{padding-top:18px !important}
  body.ub-mala .pills{justify-content:center !important;gap:10px !important;margin:26px 14px 30px !important}
  body.ub-mala .pills .pill{flex:1 1 0;border-radius:0 !important;border:0 !important;border-bottom:1px solid #111 !important;background:transparent !important}
  body.ub-mala .ord{text-align:center;padding:28px 14px 30px !important}
  body.ub-mala .ord .oi > div{flex-direction:column;align-items:center;gap:14px}
  body.ub-mala .ord .oi > div > div{align-items:center;text-align:center}
}

/* ---------- November updates ---------- */
/* "Design on the front / back" sits straight under the garment colours */
@media (max-width:760px){ .ua-o31{order:14 !important} .ua-o32{order:15 !important} }

/* Bigger logos at the top */
.ua-hdr .ua-brand img[src*="logo-1-brandless"]{height:84px !important}
.ua-hdr .ua-brand img[src*="uxj-logo"]{height:92px !important}
.ua-hdr .ua-brand img[src*="kk-logo"]{height:100px !important}
@media (max-width:760px){
  .ua-hdr .ua-brand img[src*="logo-1-brandless"]{height:60px !important}
  .ua-hdr .ua-brand img[src*="uxj-logo"]{height:68px !important}
  .ua-hdr .ua-brand img[src*="kk-logo"]{height:68px !important}
}

/* Logo style pictures: give each button room so the picture shows on phones */
body.ub-ua .ua-o44{display:flex !important;flex-wrap:wrap;justify-content:center;gap:10px !important}
body.ub-ua .ua-o44 button{flex:0 0 76px !important;width:76px !important;min-width:76px !important;height:52px !important}
body.ub-ua .ua-o44 button .dzmask{width:100% !important;height:100% !important}

/* Story pop-up: a close button you can always see, and a smaller picture on phones */
.ub-story-x{background:#F4F0E8 !important;border-radius:50% !important;box-shadow:0 2px 10px rgba(0,0,0,.22);z-index:5}
@media (max-width:760px){
  .ub-story{display:block !important}
  .ub-story-art{min-height:0 !important;padding:18px 16px !important}
  .ub-story-art > div{min-height:0 !important;height:150px !important;max-height:150px !important}
  .ub-story-art .dzmask,.ub-story-art img{min-height:0 !important}
  .ub-story-txt{max-height:none !important;overflow:visible !important;padding:20px 20px 24px !important}
  .ub-story-txt h2{font-size:30px !important;padding-right:0 !important}
  .ub-story-txt p{font-size:15px !important}
  .ub-story-x{position:fixed !important;top:calc(7vh + 8px) !important;right:24px !important}
}

/* Khalsa Kidz on phones: garments on two rows (4 on top, 3 below) */
@media (max-width:760px){
  body.ub-kk .ua-tabs{display:grid !important;grid-template-columns:repeat(12,1fr);overflow:visible !important;width:100%}
  body.ub-kk .ua-tabs button{grid-column:span 3;min-width:0;min-height:42px !important;padding:0 2px !important;font-size:10.5px !important;letter-spacing:.3px !important;white-space:nowrap}
  body.ub-kk .ua-tabs button:nth-child(n+5){grid-column:span 4;border-top:1px solid rgba(244,240,232,.35) !important}
}

/* iPhone Safari colours buttons blue unless told otherwise: keep Front / Spin / Back black */
.ua-stage button{color:#111111}

/* Story pop-up: long stories scroll inside the pop-up on every screen size */
.ub-story,.ua-story{overflow-y:auto !important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.ub-story-txt,.ua-story-txt{max-height:none !important;overflow:visible !important}

/* Order bar: more room above and inside, so the price and Add to basket can breathe */
.ua-ord{padding:28px 32px 30px !important}
@media (min-width:761px){ .ua-ord{margin-top:22px} }
