.as2po{--po-b:#d8dde3;--po-bg:#f7f8fa;--po-ac:#1f6feb;font-size:15px}
.as2po h2{margin:0 0 8px}.as2po h3{margin:0 0 12px}
.as2po-box{padding:16px;border:1px solid var(--po-b,#d8dde3);border-radius:8px;background:#f7f8fa}
.as2po-head{display:flex;gap:16px;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;margin-bottom:16px}
.as2po-badge{font-size:12px;padding:2px 10px;border-radius:12px;vertical-align:middle;color:#fff;background:#6b7280}
.as2po-badge.open{background:#15803d}.as2po-badge.scheduled{background:#b45309}.as2po-badge.closed{background:#b91c1c}
.as2po-count{font-weight:600;margin:4px 0}
.as2po-info-link{white-space:nowrap}
.as2po-cols{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start}
.as2po-side{position:sticky;top:100px;align-self:start}
.as2po-sum{--po-p:var(--wd-primary-color,#1a86a8);display:flex;flex-direction:column;max-height:calc(100vh - 124px);background:#fff;border:1px solid #e3e7eb;border-radius:12px;box-shadow:0 2px 14px rgba(15,23,42,.06);overflow:hidden}
.as2po-sum-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px;border-bottom:1px solid #eef0f3;background:#f8fafb}
.as2po-sum-head h3{margin:0;font-size:18px}
.as2po-count-badge{min-width:26px;height:26px;padding:0 8px;border-radius:13px;background:var(--po-p);color:#fff;font-size:13px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.as2po-empty{padding:34px 22px;text-align:center;color:#6b7280}.as2po-empty svg{opacity:.55;margin-bottom:6px}.as2po-empty p{margin:0;font-size:14px}
.as2po-lines{flex:1 1 auto;overflow-y:auto;padding:6px 18px;min-height:0;overscroll-behavior:contain}
.as2po-grp-t{position:sticky;top:0;background:#fff;padding:10px 0 4px;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#6b7280}
.as2po-grp ul{list-style:none;margin:0;padding:0}
.as2po-grp li{display:grid;grid-template-columns:56px minmax(0,1fr) auto 26px;gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid #f1f3f5}
.as2po-grp li:last-child{border-bottom:0}
.as2po-grp .th{width:56px!important;height:56px!important;min-width:0!important;min-height:0!important;padding:0!important;border:0!important;border-radius:8px!important;background:#f1f3f5!important;overflow:hidden;display:block;cursor:zoom-in;box-shadow:none!important}.as2po-grp .th[disabled]{cursor:default}
.as2po-grp .th img{width:100%;height:100%;object-fit:cover;display:block}
.as2po-grp .cd{font-size:13.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#2b333b}.as2po-grp .cd i{font-style:normal;color:#6b7280;font-weight:500}
.as2po-grp .pr{font-size:13.5px;font-weight:600;color:#2b333b;white-space:nowrap}
.as2po-grp .rm{width:26px!important;height:26px!important;min-width:0!important;min-height:0!important;border:0!important;border-radius:50%!important;background:#f1f3f5!important;color:#6b7280!important;font-size:18px;line-height:24px!important;cursor:pointer;padding:0!important;margin:0;box-shadow:none!important;text-transform:none;transition:.15s;display:inline-flex;align-items:center;justify-content:center}
.as2po-grp .rm:hover{background:#fee2e2!important;color:#b91c1c!important}
.as2po-totals{flex:0 0 auto;padding:14px 18px 10px;border-top:1px solid #e3e7eb;background:#f8fafb}
.as2po-totals .tot{display:flex;justify-content:space-between;align-items:baseline;margin:0 0 6px;font-size:14px;color:#4b5563}
.as2po-totals .tot b{color:#1f2933}
.as2po-totals .tot:nth-of-type(2){padding-top:8px;margin-top:2px;border-top:1px dashed #d5dae0;font-size:16px}.as2po-totals .tot:nth-of-type(2) b{font-size:18px}
.as2po-totals .tot.ship b.free{color:#15803d}
.as2po-totals .small{margin:4px 0 0}
.as2po-reassure{flex:0 0 auto;margin:0;padding:11px 18px;background:#ecf6f1;color:#25613f;font-size:12.5px;line-height:1.4}
.as2po-muted{color:#6b7280}.as2po-muted.small{font-size:12.5px}
.as2po-folders{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:16px}
.as2po-folder{display:flex;flex-direction:column;gap:4px;align-items:center;text-align:center;padding:12px;border:1px solid var(--po-b,#d8dde3);border-radius:8px;background:#fff;cursor:pointer}
.as2po-folder:hover{border-color:#1f6feb}.as2po-folder img{width:100%;aspect-ratio:1/1;max-height:220px;object-fit:contain}
.as2po-folder .n{font-weight:600}.as2po-folder .p{color:#15803d;font-weight:600}.as2po-folder .c{font-size:12.5px;color:#6b7280}
.as2po-back{border:0;background:none;color:#1f6feb;cursor:pointer;padding:0}
#as2po-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);padding:8px 16px;border-radius:20px;background:#15803d;color:#fff;opacity:0;pointer-events:none;transition:opacity .2s;z-index:9999}
#as2po-toast.show{opacity:.95}#as2po-toast.bad{background:#b91c1c}
.as2po-info h2{margin-top:1.4em}.as2po-table{width:100%;max-width:520px;border-collapse:collapse}.as2po-table th,.as2po-table td{border:1px solid #d8dde3;padding:6px 10px;text-align:left}
.as2po-acc{margin-bottom:24px}
@media (max-width:860px){.as2po-cols{grid-template-columns:1fr}.as2po-side{position:static}.as2po-sum{max-height:none}.as2po-lines{max-height:48vh}}

/* griglia puzzle: 3-4 per riga su desktop, 2 su telefono; foto ~500px */
.as2po-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
@media (min-width:1400px){.as2po-items{grid-template-columns:repeat(4,minmax(0,1fr))}}
.as2po-item{display:flex;flex-direction:column;gap:6px;padding:10px;border:2px solid var(--po-b,#d8dde3);border-radius:10px;background:#fff;text-align:center;transition:border-color .15s}
.as2po-item.on{border-color:#15803d;background:#f0fdf4}
.as2po-item .ph{position:relative;display:block;width:100%!important;padding:0!important;border:0!important;background:#f6f7f9!important;border-radius:8px!important;cursor:zoom-in;overflow:hidden;box-shadow:none!important;min-height:0!important;height:auto!important;line-height:0}
.as2po-item .ph img{width:100%;aspect-ratio:1/1;object-fit:contain;display:block}
.as2po-item .zoom{position:absolute;right:8px;bottom:8px;width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.92);box-shadow:0 1px 4px rgba(0,0,0,.25);font-size:15px;line-height:30px;opacity:0;transition:opacity .15s}
.as2po-item .ph:hover .zoom,.as2po-item .ph:focus-visible .zoom{opacity:1}
@media (hover:none){.as2po-item .zoom{opacity:.9}}
.as2po-item .t{display:flex;gap:6px;justify-content:center;align-items:center;font-size:14px;font-weight:600;cursor:pointer;margin:0}
.as2po-item .pr{font-weight:700;color:#15803d}
@media (max-width:560px){.as2po-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.as2po-item{padding:7px}.as2po-item .t{font-size:12.5px}.as2po-folders{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* paginazione */
.as2po-pager{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:12px 0}
.as2po-pager .pg{min-width:38px;height:38px;padding:0 12px!important;border:1px solid #d8dde3!important;border-radius:8px!important;background:#fff!important;color:#2b333b!important;font-weight:600;cursor:pointer;box-shadow:none!important;line-height:36px!important;text-transform:none}
.as2po-pager .pg.on{background:var(--wd-primary-color,#1a86a8)!important;border-color:var(--wd-primary-color,#1a86a8)!important;color:#fff!important}
.as2po-pager .pg[disabled]{opacity:.4;cursor:default}
.as2po-pager .dots{padding:0 4px;color:#6b7280}
.as2po-pager .info{margin-left:auto;font-size:13px;color:#6b7280}
@media (max-width:560px){.as2po-pager .prev span,.as2po-pager .next span{display:none}.as2po-pager .info{flex-basis:100%;margin:2px 0 0}}
/* lightbox */
body.as2po-lock{overflow:hidden}
#as2po-box[hidden]{display:none}
#as2po-box{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center}
#as2po-box .bk{position:absolute;inset:0;background:rgba(15,23,42,.82)}
#as2po-box .bx{position:relative;display:flex;flex-direction:column;max-width:min(94vw,1100px);max-height:94vh;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.45)}
#as2po-box .im{flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:center;background:#f3f4f6;padding:10px}
#as2po-box .im img{max-width:100%;max-height:calc(94vh - 90px);object-fit:contain;display:block}
#as2po-box .cp{display:flex;gap:14px;align-items:center;justify-content:center;flex-wrap:wrap;padding:12px 16px;border-top:1px solid #e5e7eb}
#as2po-box .c{font-weight:700}#as2po-box .p{font-weight:700;color:#15803d}
#as2po-box .x,#as2po-box .nv{position:absolute;z-index:2;width:42px!important;height:42px!important;min-width:0!important;padding:0!important;border:0!important;border-radius:50%!important;background:rgba(255,255,255,.92)!important;color:#1f2933!important;font-size:26px;line-height:40px!important;cursor:pointer;box-shadow:0 1px 6px rgba(0,0,0,.3)!important}
#as2po-box .x{top:10px;right:10px}#as2po-box .nv{top:calc(50% - 45px)}#as2po-box .pv{left:10px}#as2po-box .nx{right:10px}
#as2po-box-tick.on{background:#15803d!important;border-color:#15803d!important;color:#fff!important}
/* scheletro */
.as2po-sk-h{height:34px;width:46%;border-radius:8px;margin-bottom:18px}
.as2po-sk-g{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:16px}
.as2po-sk-h,.as2po-sk-g i{background:linear-gradient(90deg,#eef0f3 25%,#f7f8fa 37%,#eef0f3 63%);background-size:400% 100%;animation:as2sk 1.3s ease infinite}
.as2po-sk-g i{display:block;height:230px;border-radius:10px}
@keyframes as2sk{0%{background-position:100% 50%}100%{background-position:0 50%}}
.as2po-totals .tot b.calc{color:#6b7280;font-weight:500}

/* P1: barra riepilogo fissa + pannello (telefono) */
.as2po-lbl{display:block;font-size:13px;font-weight:600;color:#4b5563;margin:6px 0 2px}
#as2po-bar,#as2po-bk{display:none}
html body .as2po .as2po-sheet-x{display:none!important}
@media (max-width:860px){
body.as2po-has-bar{padding-bottom:84px}
#as2po-bar:not([hidden]){display:flex;position:fixed;left:0;right:0;bottom:0;z-index:99980;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #d8dde3;box-shadow:0 -4px 16px rgba(15,23,42,.1)}
#as2po-bar .tx{display:flex;flex-direction:column;min-width:0}#as2po-bar .tx b{font-size:15px;color:#1f2933}#as2po-bar .tx span{font-size:12px;color:#15803d}
#as2po-bar .button{flex:0 0 auto;min-width:110px;min-height:44px;margin:0}
#as2po-bk{position:fixed;inset:0;z-index:99985;background:rgba(15,23,42,.5)}
body.as2po-sheet-open #as2po-bk{display:block}
body.as2po-sheet-open{overflow:hidden}
.as2po-side{position:fixed!important;left:0;right:0;bottom:0;top:auto!important;z-index:99990;max-height:88vh;transform:translateY(105%);visibility:hidden;transition:transform .25s,visibility 0s .25s}
body.as2po-sheet-open .as2po-side{transform:none;visibility:visible;transition:transform .25s}
.as2po-side .as2po-sum{max-height:88vh;border-radius:16px 16px 0 0;border-bottom:0}
.as2po-side .as2po-lines{max-height:none}
html body .as2po .as2po-sheet-x{display:inline-flex!important;margin-left:auto;width:36px!important;height:36px!important;min-width:0!important;padding:0!important;border:0!important;border-radius:50%!important;background:#eef0f3!important;color:#1f2933!important;font-size:22px;line-height:34px!important;align-items:center;justify-content:center;cursor:pointer;box-shadow:none!important}
#as2po-toast{bottom:96px}
}
@media (prefers-reduced-motion:reduce){.as2po-side{transition:none!important}}
/* tabella Mio account -> card sotto 640px */
@media (max-width:640px){
.as2po-acc table,.as2po-acc tbody{display:block;width:100%}
.as2po-acc tr{display:block;margin:0 0 10px;padding:8px 12px;border:1px solid #d8dde3;border-radius:10px;background:#fff}
.as2po-acc td{display:block!important;width:auto!important;text-align:left!important;padding:4px 0!important;border:0!important}
.as2po-acc td::before{content:attr(data-title);display:block;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#6b7280}
}
#as2po-bar .button{background:var(--wd-primary-color,#1a86a8)!important;border-color:var(--wd-primary-color,#1a86a8)!important;color:#fff!important;border-radius:9px!important;font-weight:700}
.as2po-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* focus visibile da tastiera (il tema lo azzera) */
html body .as2po button:focus-visible,html body .as2po input:focus-visible,html body .as2po select:focus-visible,html body .as2po a:focus-visible,html body #as2po-box button:focus-visible,html body #as2po-bar button:focus-visible,html body .as2po-side button:focus-visible{outline:3px solid #1a6fb5!important;outline-offset:2px!important}
#as2po-box .x:focus-visible,#as2po-box .nv:focus-visible{outline-color:#1a6fb5!important;outline-offset:-3px!important}
.as2po-item .ph:focus-visible .zoom{opacity:1}
.as2po-acc-th{width:44px;height:44px;object-fit:cover;border-radius:6px;vertical-align:middle;margin-right:6px}
@media (max-width:640px){.as2po-acc thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}}
.as2po-acc td a{font-weight:700;text-decoration:underline}
.as2po-est-box{margin:0 0 16px;padding:12px 16px;border:1px solid #d8dde3;border-radius:10px;background:#f8fafb}.as2po-est-box p{margin:6px 0 0}
/* avviso prenotazioni chiuse */
.as2po-closed{display:flex;align-items:flex-start;gap:12px;margin:12px 0;padding:12px 16px;border:1px solid #f1d4d4;border-left:4px solid #b91c1c;border-radius:10px;background:#fdf5f5;color:#7a1f1f;font-size:14.5px;line-height:1.5;max-width:640px}
.as2po-closed .ic{flex:0 0 22px;width:22px;height:22px;margin-top:1px;background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b91c1c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E")}
.as2po-closed p{margin:0}
.as2po-closed a{color:var(--wd-primary-color,#1a86a8);font-weight:600;text-decoration:underline;word-break:break-all}
