/* The AI at work: a turning wheel, what it is doing and the elapsed time, in the chat and over the preview. */
.ai-spinner{display:inline-block;flex:0 0 auto;width:18px;height:18px;border-radius:50%;border:2.5px solid rgba(10,63,181,.2);border-top-color:#0A3FB5;animation:ai-spin .8s linear infinite;box-sizing:border-box}
.ai-spinner.large{width:46px;height:46px;border-width:4px}
.ai-spinner.light{border-color:rgba(255,255,255,.35);border-top-color:#fff}
@keyframes ai-spin{to{transform:rotate(360deg)}}
.bubble.ai-progress{display:flex;align-items:center;gap:12px;align-self:stretch;max-width:100%;background:#eef3ff;color:#0d1726;white-space:normal}
.bubble.ai-progress .ai-progress-text{flex:1;min-width:0}
.ai-progress-time{font-variant-numeric:tabular-nums;font-size:13px;color:#4a5568}
.bubble.ai-progress.paused .ai-spinner{animation:none;border-top-color:rgba(10,63,181,.2)}
.ai-overlay{position:absolute;inset:0;z-index:5;display:flex;justify-content:center;align-items:flex-start;padding:clamp(70px,16vh,190px) 16px 16px;background:rgba(250,249,246,.74);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
.studio-preview.ai-busy,body.flex-beauty-v2 .studio-preview.ai-busy{position:relative}
.ai-overlay-card{position:sticky;top:28vh;display:flex;flex-direction:column;align-items:center;gap:10px;max-width:320px;padding:22px 24px;background:#fff;border-radius:10px;box-shadow:0 10px 32px rgba(13,23,38,.16);text-align:center}
.ai-overlay-card b{font-size:17px;color:#0d1726}
.ai-overlay-card small{font-size:13px;line-height:1.5;color:#4a5568}
#design-send.busy{opacity:1}
#design-status.working::before{content:'';display:inline-block;width:14px;height:14px;margin-right:8px;vertical-align:-2px;box-sizing:border-box;border-radius:50%;border:2px solid rgba(10,63,181,.2);border-top-color:#0A3FB5;animation:ai-spin .8s linear infinite}
.text-options{margin-top:6px}
.text-options .styles{margin:6px 0 12px}
/* Free text over the photo: any colour, moved and resized with sliders. */
.text-free{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;margin:0 0 12px}
.text-free label{margin:6px 0 0}
.text-free input[type=color]{justify-self:start;width:52px;height:34px;padding:2px;border:1px solid #c9d8f5;border-radius:6px;background:#fff;cursor:pointer}
.text-free input[type=range]{width:100%;min-height:28px;margin:0;accent-color:#0a3fb5}
.text-free #text-reset{justify-self:start;margin-top:8px}
.text-free .slide{display:flex;align-items:center;gap:10px}
.text-free .slide input{flex:1;min-width:0}
.text-free .slide span{flex:0 0 auto;min-width:1em;text-align:center;font-size:16px;line-height:1;color:#4a5568}
.text-free .slide .a-small{font-size:11px}
.text-free .slide .a-large{font-size:20px}
@media(max-width:760px){.ai-overlay{padding-top:90px}}
@media(prefers-reduced-motion:reduce){.ai-spinner{animation-duration:2.4s}}
/* The front label stays in view while editing: sticky column on computers, a small live copy on phones. */
@media(min-width:761px){body.flex-beauty-v2 .workspace>.studio-preview{align-self:stretch}body.flex-beauty-v2 .studio-preview>.label-review{position:sticky;top:12px;z-index:3}body.flex-beauty-v2 .studio-preview>.label-review .label-flat{max-height:calc(100vh - 230px)}}
.mini-label{display:none}
@media(max-width:760px){.mini-label:not([hidden]){position:fixed;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:40;display:block;width:78px;padding:4px 4px 2px;background:#fff;border:1px solid #e5e0d8;border-radius:8px;box-shadow:0 6px 20px rgba(13,23,38,.25)}.mini-label img{display:block;width:100%;height:auto}.mini-label span{display:block;font-size:11px;line-height:1.4;text-align:center;color:#4a5568}}
.image-actions{display:flex;flex-wrap:wrap;gap:0 20px;align-items:center}
/* Order bar on phones and a visible reason when «Aggiungi al carrello» is still grey */
.studio-orderbar{display:none}
.confirm-hint{margin:10px 0 0}
.confirm-hint[hidden]{display:none}
@keyframes confirm-pulse{0%{box-shadow:0 0 0 0 rgba(10,63,181,.45)}70%{box-shadow:0 0 0 12px rgba(10,63,181,0)}100%{box-shadow:0 0 0 0 rgba(10,63,181,0)}}
#brand.needs-confirm{outline:2px solid #0a3fb5;outline-offset:3px;animation:confirm-pulse 1.2s ease-out 2}
label.check.needs-confirm{outline:2px solid #0a3fb5;outline-offset:6px;border-radius:6px;animation:confirm-pulse 1.2s ease-out 2}
@media (max-width:760px){
 .studio-orderbar:not([hidden]){position:fixed;left:0;right:0;bottom:0;z-index:45;display:flex;align-items:center;gap:12px;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));background:#fff;border-top:1px solid #c9d8f5;box-shadow:0 -6px 18px rgba(0,32,103,.10)}
 .studio-orderbar-total{display:flex;flex-direction:column;min-width:0;line-height:1.2}
 .studio-orderbar-total span{font-size:11px;color:#4e5c72}
 .studio-orderbar-total strong{font-size:17px;color:#0d1726;white-space:nowrap}
 .studio-orderbar .btn{flex:1;min-height:48px;margin:0;padding-left:12px;padding-right:12px}
 body.orderbar-on{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
 body.flex-beauty-v2.orderbar-on .chat-launch,body.orderbar-on .chat-launch{bottom:calc(82px + env(safe-area-inset-bottom,0px))}
 body.orderbar-on .mini-label:not([hidden]){bottom:calc(140px + env(safe-area-inset-bottom,0px))}
}
/* Shipping, payment and Christmas deadline: studio (under «Aggiungi al carrello») and cart (under the total). */
.studio-promo{margin:10px 0 0;font-size:13px;line-height:1.5}
.cart-promo{margin:10px 0 18px}
.cart-promo .hint{margin:6px 0 0;font-size:13px;line-height:1.5}
.cart-promo .ship-note{color:var(--season-accent,#0a3fb5);font-weight:600}
.cart-promo .xmas-note{font-weight:600}
/* Parola che un cosmetico non può usare: messaggio sotto «Nome o dedica» e campo evidenziato (claim.js). */
.field-warning{margin:8px 0 0;padding:10px 12px;border-left:4px solid #b3261e;border-radius:6px;background:#fdf0ef;color:#8c1d18;font-size:15px;line-height:1.45}
.field-warning[hidden]{display:none}
#brand.has-claim{border-color:#b3261e;box-shadow:0 0 0 2px rgba(179,38,30,.18)}
/* Carrello da telefono: «Parliamone» diventa un pulsante rotondo e non copre gli avvisi dei prodotti. */
@media (max-width:760px){
 body:has(#cart-items) .chat-launch{font-size:0;width:52px;height:52px;min-height:52px;padding:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center}
 body:has(#cart-items) .chat-launch::before{content:'✧';content:'✧'/'';font-size:22px;line-height:1}
}
/* Quick studio on phones: the bottle with the name, a photo, the AI, the quantity and the order; the rest behind «Tutte le opzioni». */
.quick-tools,.quick-more{display:none}
@media (max-width:760px){
#main-content.studio-quick .pagehead,#main-content.studio-quick .studio-jumps,#main-content.studio-quick .editor .stepsbar,
#main-content.studio-quick .editor .identity-group>legend,#main-content.studio-quick .editor .identity-group .field>.hint,
#main-content.studio-quick .editor .design-options,#main-content.studio-quick .editor .pdf-options,
#main-content.studio-quick .editor .field:has(#logo-upload)>label,#main-content.studio-quick .editor .field:has(#logo-upload)>.hint:not(#logo-status),
#main-content.studio-quick .editor #image-role-field,#main-content.studio-quick .editor #decoration-field,
#main-content.studio-quick .editor details:has(#reference-upload),#main-content.studio-quick:not(.studio-has-image) .editor .check:has(#image-rights),
#main-content.studio-quick .editor #save-design,#main-content.studio-quick .editor .share-creation,#main-content.studio-quick .editor>.sub,
#main-content.studio-quick .editor label[for="quantity-custom"],#main-content.studio-quick .editor #quantity-custom,
#main-content.studio-quick .studio-preview>.viewer-controls,#main-content.studio-quick #model-preview .viewer-controls,
#main-content.studio-quick #model-preview .preview-detail,#main-content.studio-quick .studio-preview .commercial-preview,
#main-content.studio-quick #photo-preview>:not(.preview-picture),#main-content.studio-quick .label-review details,
#main-content.studio-quick .label-review #preview-version{display:none!important}
#main-content.studio-quick .editor #logo-upload{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
#main-content.studio-quick .preview-picture img{max-height:52vh;width:auto;max-width:100%;margin:0 auto;display:block}
#main-content.studio-quick .label-review .label-flat{max-height:40vh;width:auto;max-width:100%;margin:0 auto;display:block}
#main-content.studio-quick .quick-tools{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:4px 0 18px}
#main-content.studio-quick .quick-tools .btn{margin:0;min-height:52px;display:flex;align-items:center;justify-content:center;text-align:center;padding:10px 8px;cursor:pointer}
#main-content.studio-quick .quick-more{display:block;margin:16px auto 0}
#main-content.studio-quick:not(.studio-has-image) .editor #decoration-controls,#main-content.studio-quick #checks .success{display:none!important}
}
/* 9 November 2026 (Paolo): the first orders had only names. On phones photo and AI come right under the bottle, as two
   big buttons with a line that says what they do, and «Parliamone» becomes round so it does not cover them. */
.quick-tools .btn small{display:block;font-size:13px;font-weight:400;line-height:1.3;opacity:.82}
@media (max-width:760px){
 #main-content.studio-quick .quick-tools{grid-template-columns:1fr;gap:10px;margin:14px 0 20px}
 #main-content.studio-quick .quick-tools .btn{flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;text-align:left;line-height:1.25;min-height:64px;padding:12px 16px;font-size:17px}
 body:has(#main-content.studio-quick) .chat-launch{font-size:0;width:52px;height:52px;min-height:52px;padding:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center}
 body:has(#main-content.studio-quick) .chat-launch::before{content:'✧';content:'✧'/'';font-size:22px;line-height:1}
}
.start-here{outline:3px solid #0a3fb5;outline-offset:3px;border-radius:8px}
