.threeopka-order-presentation{margin:16px 0;padding:20px;border:1px solid #dce3ec;border-radius:12px;background:#fff;color:#172334;text-align:left;font-size:14px;line-height:1.5;box-sizing:border-box}
.threeopka-order-presentation .threeopka-order-title{margin:0 0 14px;font-size:18px;line-height:1.4;font-weight:700;color:#172334}
.threeopka-order-summary,.threeopka-order-meta-details{margin:0!important;padding:0!important}
.threeopka-order-row{display:flex;flex-wrap:wrap;gap:4px 12px;margin:4px 0;overflow-wrap:anywhere}
.threeopka-order-row dt{font-weight:600;min-width:125px}.threeopka-order-row dd{margin:0!important;flex:1;min-width:100px}
.threeopka-order-details,.threeopka-file-history{margin:14px 0;border-top:1px solid #e4eaf1;padding-top:8px}
.threeopka-order-details>summary,.threeopka-file-history>summary{cursor:pointer;padding:8px 0;font-weight:600;color:#2252a3}
.threeopka-order-meta-details{padding:12px!important;background:#f6f8fb;border-radius:8px}.threeopka-order-meta-details code,.threeopka-order-meta-details pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;max-height:230px;overflow:auto;margin:0}
.threeopka-apparel-file-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-top:16px}
.threeopka-order-presentation:not(.threeopka-order-admin) .threeopka-apparel-file-cards{grid-template-columns:repeat(4,minmax(0,1fr))}
.threeopka-order-size{display:inline-block;white-space:nowrap;font-weight:600;line-height:1.8}
.threeopka-file-card{padding:12px;border:1px solid #dce3ec;border-radius:10px;background:#fafcff;min-width:0;overflow-wrap:anywhere}
.threeopka-file-card h4{margin:0 0 10px!important;font-size:14px;font-weight:700;color:#172334}
.threeopka-file-card .threeopka-apparel-lightbox-link{display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #e7ebf0;border-radius:8px;margin-bottom:10px;overflow:hidden}
.threeopka-file-card .threeopka-apparel-lightbox-link img{width:100%;height:190px;object-fit:contain;display:block}
.threeopka-file-card a{overflow-wrap:anywhere;font-size:12px}.threeopka-file-card small,.threeopka-preview-fallback{display:block;font-size:11px;color:#58677b;line-height:1.5}
.threeopka-file-badge{display:block;margin:10px 0;padding:6px 8px;border-radius:6px;font-size:12px;font-weight:600;background:#fff0c7;color:#714d00}
.threeopka-file-badge-approved{background:#e3f3e9;color:#1c653d}.threeopka-file-badge-rejected{background:#fde7e5;color:#a1261c}.threeopka-file-badge-unlocked{background:#e3efff;color:#2252a3}
.threeopka-file-actions{display:flex;flex-wrap:wrap;gap:6px}.threeopka-file-actions .button{margin:0!important;white-space:normal!important;font-size:12px!important;padding:3px 10px!important;text-align:center}
.threeopka-replace-label{display:block;color:#b42318;font-weight:700;margin:10px 0 5px}.threeopka-file-card input[type=file]{width:100%;max-width:100%;font-size:11px}
.threeopka-replace-upload>summary{cursor:pointer;display:list-item;font-size:12px;padding:4px 0}
.threeopka-replace-upload>summary:focus-visible{outline:2px solid #005cff;outline-offset:3px}
.threeopka-replace-upload .threeopka-abbigliamento-account-file-form{margin:8px 0 0}
.threeopka-file-card .threeopka-upload-confirm{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;background:#005cff!important;color:#fff!important;border:1px solid #005cff!important;border-radius:6px;padding:9px 12px!important;margin-top:10px;font-size:13px!important;line-height:1.3!important;font-weight:600;min-height:38px;text-transform:none}
.threeopka-file-card .threeopka-upload-confirm:hover{background:#0048cc!important;border-color:#0048cc!important}
.threeopka-file-card .threeopka-upload-confirm:focus-visible{outline:2px solid #005cff;outline-offset:3px}
.threeopka-upload-confirm svg{width:16px;height:16px;flex-shrink:0}
.threeopka-file-history ol{margin:8px 0 0 20px;max-height:220px;overflow:auto;font-size:12px}
.threeopka-order-admin{background:#fff;margin:14px 0;padding:20px}.threeopka-admin-configuration>td{padding:8px 12px!important}
.woocommerce-order-details table:has(.threeopka-order-presentation) .product-name{width:85%}
.woocommerce-order-details table:has(.threeopka-order-presentation) .product-total{width:15%;white-space:nowrap}
@media(min-width:1100px){.threeopka-order-admin .threeopka-apparel-file-cards{grid-template-columns:repeat(var(--threeopka-card-count,4),minmax(0,1fr))}}
@media(max-width:900px){.threeopka-order-presentation:not(.threeopka-order-admin) .threeopka-apparel-file-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.threeopka-order-presentation{padding:12px}.threeopka-apparel-file-cards{grid-template-columns:repeat(var(--threeopka-card-mobile-count,2),minmax(0,1fr));gap:8px}.threeopka-file-card{padding:8px}.threeopka-file-card .threeopka-apparel-lightbox-link img{height:150px}.threeopka-order-row dt{min-width:110px}}
@media(max-width:380px){.threeopka-order-presentation:not(.threeopka-order-admin) .threeopka-apparel-file-cards{grid-template-columns:minmax(0,1fr)}}
/* Mobile presentation only: the product configuration must not share a narrow
   table cell with the monetary total. Desktop and admin tables are unchanged. */
@media(max-width:600px){
 .woocommerce-order-details table.order_details:has(.threeopka-order-presentation){display:block;width:100%;max-width:100%;box-sizing:border-box}
 .woocommerce-order-details table.order_details:has(.threeopka-order-presentation)>thead{display:none}
 .woocommerce-order-details table.order_details:has(.threeopka-order-presentation)>tbody,
 .woocommerce-order-details table.order_details:has(.threeopka-order-presentation)>tbody>tr{display:block;width:100%}
 .woocommerce-order-details table.order_details:has(.threeopka-order-presentation)>tbody>tr>td{display:block;width:100%!important;box-sizing:border-box;padding:8px;text-align:left;min-width:0}
 .woocommerce-order-details table.order_details:has(.threeopka-order-presentation)>tbody>tr>td.product-total{text-align:right;border-top:0;white-space:normal}
 .woocommerce-order-details table.order_details:has(.threeopka-order-presentation)>tbody>tr>td.product-total::before{content:'Totale articolo: ';font-weight:600}
 .woocommerce-order-details table.order_details:has(.threeopka-order-presentation)>tfoot{display:table;width:100%;table-layout:fixed}
 .woocommerce-order-details .threeopka-order-presentation:not(.threeopka-order-admin){width:100%;margin:8px 0;padding:10px}
 .threeopka-order-presentation:not(.threeopka-order-admin) .threeopka-upload-confirm{white-space:nowrap!important;word-break:normal;overflow-wrap:normal;letter-spacing:normal!important;padding:9px 6px!important;gap:4px}
 .threeopka-order-presentation:not(.threeopka-order-admin) .threeopka-upload-confirm span{white-space:nowrap;word-break:normal;overflow-wrap:normal}
 .woocommerce-account .woocommerce table.woocommerce-orders-table{display:block;width:100%;max-width:100%;box-sizing:border-box}
 .woocommerce-account .woocommerce table.woocommerce-orders-table thead{display:none}
 .woocommerce-account .woocommerce table.woocommerce-orders-table tbody,
 .woocommerce-account .woocommerce table.woocommerce-orders-table tbody tr{display:block;width:100%}
 .woocommerce-account .woocommerce table.woocommerce-orders-table tbody tr{margin-bottom:12px;border-bottom:1px solid #dce3ec}
 .woocommerce-account .woocommerce table.woocommerce-orders-table tbody th,
 .woocommerce-account .woocommerce table.woocommerce-orders-table tbody td{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;box-sizing:border-box;text-align:right;padding:8px 10px;overflow-wrap:anywhere}
 .woocommerce-account .woocommerce table.woocommerce-orders-table tbody td::before{content:attr(data-title);font-weight:600;text-align:left;flex-shrink:0}
 .woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions{flex-wrap:wrap}
 .woocommerce-account .woocommerce table.woocommerce-orders-table .button{white-space:nowrap;letter-spacing:normal}
 /* Scoped to Abbigliamento rows, without altering quantities or cart data. */
 .woocommerce-cart .woocommerce table.shop_table tr:has(.threeopka-abbigliamento-cart-fixed-list) td.product-name{float:none;text-align:left;min-width:0;clear:both}
 .woocommerce-cart .woocommerce table.shop_table tr:has(.threeopka-abbigliamento-cart-fixed-list) td.product-name::before{float:none;display:block;margin-bottom:6px}
 .woocommerce-cart .wc-block-cart-items__row:has(.threeopka-abbigliamento-cart-fixed-list){grid-template-columns:64px minmax(0,1fr)}
 .woocommerce-cart .wc-block-cart-items__row:has(.threeopka-abbigliamento-cart-fixed-list) .wc-block-cart-item__product{min-width:0}
 .woocommerce-cart .wc-block-cart-items__row:has(.threeopka-abbigliamento-cart-fixed-list) .wc-block-cart-item__total{grid-column:1/-1;text-align:right}
 .woocommerce-cart .threeopka-abbigliamento-cart-fixed-list{min-width:0;max-width:100%;overflow-wrap:anywhere;text-align:left}
}
/* LocalWP post-2.1.83 draft: style the EXISTING Blocks remove button only.
   No second control, event handler, quantity, pricing or cart-data change. */
.woocommerce-cart .wc-block-cart .wc-block-cart-items__row:has(.threeopka-abbigliamento-cart-fixed-list) .wc-block-cart-item__remove-link{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;width:auto!important;height:auto!important;min-height:40px;padding:8px 12px!important;margin-top:10px;border:1px solid #b42318!important;border-radius:6px;background:#fff!important;color:#b42318!important;font-size:14px!important;font-weight:600;line-height:1.2;white-space:nowrap;word-break:normal;overflow-wrap:normal;text-indent:0!important;text-decoration:none!important;position:relative!important;z-index:1;float:none!important}
.woocommerce-cart .wc-block-cart .wc-block-cart-items__row:has(.threeopka-abbigliamento-cart-fixed-list) .wc-block-cart-item__remove-link::before{content:none!important}
.woocommerce-cart .wc-block-cart .wc-block-cart-items__row:has(.threeopka-abbigliamento-cart-fixed-list) .wc-block-cart-item__remove-link::after{content:'Elimina';font-size:14px;white-space:nowrap;letter-spacing:normal}
.woocommerce-cart .wc-block-cart .wc-block-cart-items__row:has(.threeopka-abbigliamento-cart-fixed-list) .wc-block-cart-item__remove-link svg{width:18px;height:18px;fill:currentColor;flex-shrink:0}
.woocommerce-cart .wc-block-cart .wc-block-cart-items__row:has(.threeopka-abbigliamento-cart-fixed-list) .wc-block-cart-item__remove-link:hover{background:#fff1f0!important}
.woocommerce-cart .wc-block-cart .wc-block-cart-items__row:has(.threeopka-abbigliamento-cart-fixed-list) .wc-block-cart-item__remove-link:focus-visible{outline:2px solid #b42318;outline-offset:3px}

/* Classic cart: the original native link is moved below item details, not cloned.
   Keep the wrapper selector required by WooCommerce's delegated remove handler. */
.woocommerce-cart .woocommerce-cart-form td.product-name > .threeopka-apparel-remove-wrap.product-remove{display:block!important;width:auto!important;max-width:100%;margin:10px 0 0;padding:0;text-align:left}
.woocommerce-cart .woocommerce-cart-form .threeopka-apparel-remove-wrap > a.threeopka-apparel-remove{display:inline-flex!important;align-items:center;justify-content:center;width:auto!important;height:auto!important;max-width:100%;min-height:40px;margin:0!important;padding:8px 12px!important;border:1px solid #b42318!important;border-radius:6px!important;background:#fff!important;color:#b42318!important;font-size:14px!important;font-weight:600;line-height:1.2;text-indent:0!important;text-decoration:none!important;position:static!important;float:none!important;white-space:normal;overflow-wrap:anywhere}
.woocommerce-cart .woocommerce-cart-form a.threeopka-apparel-remove::before,.woocommerce-cart .woocommerce-cart-form a.threeopka-apparel-remove::after{content:none!important}
.woocommerce-cart .woocommerce-cart-form a.threeopka-apparel-remove:hover{background:#fff1f0!important}
.woocommerce-cart .woocommerce-cart-form a.threeopka-apparel-remove:focus-visible{outline:2px solid #b42318;outline-offset:3px}

/* Cart only: keep zone names available to assistive technology and the lightbox. */
body.woocommerce-cart tr:has(.threeopka-abbigliamento-cart-fixed-list) .threeopka-apparel-cart-mockups > a > img + span{
    position:absolute!important;width:1px!important;height:1px!important;
    padding:0!important;margin:-1px!important;border:0!important;
    overflow:hidden!important;clip:rect(0,0,0,0)!important;
    clip-path:inset(50%)!important;white-space:nowrap!important;
}
