/***********************************
*********** Product CSS ************
************************************/
.woocommerce div.product .custom_upload_field_container {
    display: block;
}

.woocommerce div.product .custom_upload_field_container>label {
    margin-bottom: 10px;
    display: block;
    font-weight: 600;
    line-height: normal;
}

.woocommerce div.product .uploader_input_file {
    font-size: 95%;
}

/* The Inch/MM toggle sits in its own row directly under the upload dock, right-aligned within that
   row ( per Andy's request ). `.uploader_unit_switch` itself stays `display: inline-flex` ( see its
   own rule further down ), so a plain `text-align: right` on this wrapping row is enough to push it
   to the right without needing flex/justify-content here. */
.woocommerce div.product .uploader_unit_switch_row {
    text-align: right;
    margin-top: 6px;
}

/* 5.5.0 - drop zone restyled ( "Soft Panel" ): thin soft dashed border, pale panel, one row.
   Replaces the 10 px navy dashed box. Class names kept - the JS drag & drop binds to them. */
.woocommerce div.product .uploader_files_dock {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    border: 2px dashed #9aa6e0;
    border-radius: 18px;
    background: #f5f7ff;
    padding: 18px 22px 26px;
    font-size: 15px;
    text-align: left;
    transition: border-color .15s, background-color .15s;
}
.woocommerce div.product .uploader_files_dock.uploader_files_dock_hover {
    border-color: #121A5A;
    background: #e9edff;
}
.woocommerce div.product .uploader-dock-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.woocommerce div.product .uploader-dock-cloud {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    color: #121A5A;
    box-shadow: 0 4px 14px rgba(18, 26, 90, .12);
    display: flex;
    align-items: center;
    justify-content: center;
}
.woocommerce div.product .uploader-dock-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.woocommerce div.product .uploader-dock-text strong {
    font-size: 17px;
    line-height: 1.25;
    color: #121A5A;
}
.woocommerce div.product .uploader-dock-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.woocommerce div.product .uploader-dock-chips span {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    color: #3b4256;
    background: #fff;
    border: 1px solid #dde2f2;
    border-radius: 999px;
    padding: 2px 10px;
}
.woocommerce div.product .uploader_files_dock label.custom-upload-trigger.button {
    flex: none;
    margin: 0;
    float: none;
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: #121A5A;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.woocommerce div.product .uploader_files_dock label.custom-upload-trigger.button:hover {
    background: #2a37a8;
    color: #fff;
}
.woocommerce div.product span.uploader-files-dock-limit {
    position: absolute;
    bottom: 6px;
    right: 16px;
    font-size: 13px;
    color: #5b6275;
}
@media (max-width: 520px) {
    .woocommerce div.product .uploader-dock-row {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    .woocommerce div.product .uploader-dock-chips {
        justify-content: center;
    }
}

.woocommerce div.product .uploader_description {
    font-size: 95%;
    color: #666;
    margin: 5px 0 15px 0;
    clear: both;
    display: block;
}

.woocommerce div.product .uploader_notice {
    display: block;
    padding: 5px 10px;
    font-size: 90%;
    margin-top: 5px;
    background: #ffecec;
    color: #e80000;
    clear: both;
}

.woocommerce div.product .uploader_notice bdi {
    display: block;
}

.woocommerce div.product .uploader_files_completed {
    font-size: 95%;
    width: 100%;
    table-layout: fixed;
    margin-top: 15px;
}

.woocommerce div.product .uploader_files_completed .uploader_files_completed_placeholder th {
    font-weight: 500;
    text-align: center;
}

.woocommerce div.product .uploader_files_pending {
    display: block;
    font-size: 95%;
}

.woocommerce div.product .uploader_files_completed>span,
.woocommerce div.product .uploader_files_pending>span {
    display: block;
}

.woocommerce div.product .uploader_files_completed>span *,
.woocommerce div.product .uploader_files_pending>span * {
    vertical-align: middle;
}

.woocommerce div.product .uploader_files_completed>span:last-child,
.woocommerce div.product .uploader_files_pending>span:last-child {
    margin-bottom: 10px;
}

/* Cross-browser/cross-OS delete "X" - a plain CSS-drawn red circle + white X. This used to be a
   Dashicons icon-font glyph ( font-family: dashicons; content: "\f335"; ), but Dashicons isn't
   guaranteed to be enqueued on the storefront front-end by every theme, so the X would sometimes
   render as nothing at all ( reported as invisible on some Windows/desktop browsers, visible on
   macOS Safari - consistent with a missing font rather than a real browser incompatibility ). Drawn
   entirely with CSS box/pseudo-element styling below, so it has no font dependency and renders
   identically everywhere. */
.woocommerce .uploader-delete-file {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    cursor: pointer;
    margin-right: 5px;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    border-radius: 50%;
    background: #d63638;
    transition: opacity .1s ease-in;
}

.woocommerce .uploader-delete-file:before,
.woocommerce .uploader-delete-file:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}

.woocommerce .uploader-delete-file:before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.woocommerce .uploader-delete-file:after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.woocommerce .uploader-delete-file:hover {
    opacity: .8;
}

/* Pinned to the thumb-wrap's own top-left corner ( inside its reserved label gutter ), rather than
   flowing as plain inline content before the wrap - that kept the X button clear of the rotated Height
   label on narrow/portrait thumbnails ( e.g. most TIFF uploads ), where the label's vertical center
   sits much higher up the row and could otherwise land right where the X used to be. */
.woocommerce div.product .uploader-thumb-wrap .uploader-delete-file {
    position: absolute;
    top: 0;
    left: 0;
    margin-right: 0;
    z-index: 3;
}

.woocommerce div.product .uploader_progress {
    margin-left: 3px;
    margin-right: 3px;
    font-weight: 600;
}

.woocommerce div.product .uploader_progress {
    margin-left: 3px;
    margin-right: 3px;
    font-weight: 600;
}

.woocommerce div.product table.uploader_files_completed thead,
.woocommerce div.product table.uploader_files_completed tbody,
.woocommerce div.product table.uploader_files_completed tfoot {
    border: 1px solid #f1f1f1;
    background-color: #fefefe;
}

.woocommerce div.product table.uploader_files_completed thead th,
.woocommerce div.product table.uploader_files_completed thead td,
.woocommerce div.product table.uploader_files_completed tfoot th,
.woocommerce div.product table.uploader_files_completed tfoot td {
    padding: .5rem .625rem .625rem;
    font-weight: 700;
    border: none;
}

.woocommerce div.product table.uploader_files_completed thead tr,
.woocommerce div.product table.uploader_files_completed tfoot tr {
    background: transparent;
}

.woocommerce div.product table.uploader_files_completed thead,
.woocommerce div.product table.uploader_files_completed tbody,
table tfoot {
    border: none;
    background-color: rgba(0, 0, 0, 0.01);
}

.woocommerce div.product table.uploader_files_completed thead {
    background: #f8f8f8;
    color: #0a0a0a;
}

.woocommerce div.product table.uploader_files_completed tbody th,
.woocommerce div.product table.uploader_files_completed tbody td {
    padding: .5rem .625rem .625rem;
}

.woocommerce div.product table.uploader_files_completed thead {
    background: rgba(0, 0, 0, 0.02);
    color: inherit;
}

/* Each uploaded file now renders as 3 consecutive rows ( data row, dedicated filename row, warning/
   no-warning row ), not 2 - plain `:nth-child(even)` striped individual ROWS regardless of that
   grouping, so the shading fell out of sync with file boundaries ( sometimes the filename row shaded,
   sometimes the warning row, looking like random noise ). Group rows in 3s instead, and shade every
   other FILE ( 2nd, 4th, 6th... - i.e. rows 4,5,6 then 10,11,12 then 16,17,18... = every row where
   ( position mod 6 ) is 4, 5, or 0 ). */
.woocommerce div.product table.uploader_files_completed tbody tr:nth-child(6n+4),
.woocommerce div.product table.uploader_files_completed tbody tr:nth-child(6n+5),
.woocommerce div.product table.uploader_files_completed tbody tr:nth-child(6n) {
    background-color: rgba(0, 0, 0, 0.03);
}

.woocommerce div.product .uploader_files_completed_titles th {
    text-align: center;
}

.woocommerce div.product .completed.custom-uploaded-file>td {
    position: relative;
}

.woocommerce div.product .completed.custom-uploaded-file>td>.uploader-delete-file {
    position: relative;
}

.woocommerce div.product .completed.custom-uploaded-file>td>bdi {
    word-break: break-all;
}

.woocommerce div.product .completed.custom-uploaded-file>td>strong {
    font-weight: 600;
}

/* Dedicated full-width row for the filename ( spans every column, X button to sub-total price ) so it
   never has to squeeze in next to the thumbnail. */
.woocommerce div.product .uploader-filename-row>td {
    font-size: 95%;
    word-break: break-all;
    padding-top: 0;
}

.woocommerce div.product .uploader-filename-row>td>strong {
    font-weight: 600;
}

.woocommerce div.product form.cart table {
    border-width: 0 0 1px;
}

/* Table is `table-layout: fixed`, so these widths ( set on the header row's th's ) are what actually
   fix each column's width. `.uploader-filename` gets a guaranteed minimum so the thumbnail always has
   room to render without spilling into the Width/Height columns - this matters most once the SQFT/Price
   columns are showing too, since those extra unweighted columns would otherwise squeeze it further. */
.woocommerce div.product .uploader_files_completed .uploader-filename {
    width: 230px;
}

.woocommerce div.product .uploader_files_completed .uploader-width,
.woocommerce div.product .uploader_files_completed .uploader-height {
    width: 120px;
}

.woocommerce div.product .uploader_files_completed .uploader-qty {
    width: 80px;
}

.woocommerce div.product .uploader_files_completed .uploader-sqft {
    width: 70px;
}

.woocommerce div.product .uploader_files_completed .uploader-price {
    width: 90px;
}

/* Inch/MM display-unit toggle.
   Many themes apply their own generic styling to every <button> element on the page ( full width,
   brand color, uppercase text, etc. - the same look as the "Browse..."/"Add to cart" buttons ).
   Our selectors here are already more specific than a bare "button" or ".woocommerce button" rule,
   but `!important` is added defensively so this toggle can't be pulled out of shape by a theme
   stylesheet that happens to load after ours or that used `!important` itself. */
.woocommerce div.product .uploader_unit_switch {
    display: inline-flex !important;
    width: auto !important;
    max-width: none !important;
    /* Sits beside the upload dock now (see the flex layout rules near the top of this file) - the
       parent's `gap` already provides spacing, so no margin needed here. */
    margin: 0 !important;
    border: 1px solid rgba(0, 0, 0, .2) !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    background: none !important;
    box-shadow: none !important;
}

.woocommerce div.product .uploader-unit-btn {
    display: inline-block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 4px 14px !important;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #333 !important;
    font-size: 13px !important;
    font-weight: normal !important;
    line-height: 1.4 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-align: center !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

.woocommerce div.product .uploader-unit-btn+.uploader-unit-btn {
    border-left: 1px solid rgba(0, 0, 0, .2) !important;
}

.woocommerce div.product .uploader-unit-btn.active {
    background: #333 !important;
    color: #fff !important;
}

/* Horizontal-scroll safety net: if the table ever ends up wider than the space available ( most likely
   in SQFT mode, with 6 columns instead of 4 ), it scrolls instead of visually breaking/getting cut off. */
.woocommerce div.product .uploader_files_completed_scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Tighter column widths ( and smaller text ) specifically when the SQFT/Price columns are showing, so
   the 6-column table has a much better chance of fitting without needing to scroll at all. */
.woocommerce div.product .uploader-sqft-mode .uploader_files_completed {
    font-size: 88%;
}

.woocommerce div.product .uploader-sqft-mode .uploader_files_completed .uploader-filename {
    width: 180px;
}

.woocommerce div.product .uploader-sqft-mode .uploader_files_completed .uploader-width,
.woocommerce div.product .uploader-sqft-mode .uploader_files_completed .uploader-height {
    width: 85px;
}

.woocommerce div.product .uploader-sqft-mode .uploader_files_completed .uploader-qty {
    width: 55px;
}

.woocommerce div.product .uploader-sqft-mode .uploader_files_completed .uploader-sqft {
    width: 50px;
}

.woocommerce div.product .uploader-sqft-mode .uploader_files_completed .uploader-price {
    width: 65px;
}

.woocommerce div.product .uploader-sqft-mode .uploader_files_completed thead th,
.woocommerce div.product .uploader-sqft-mode .uploader_files_completed tbody td {
    padding: .4rem .4rem .5rem;
}

.woocommerce div.product form.cart .uploader-sqft-mode table.uploader_files_completed input {
    padding: 4px;
    max-width: 55px;
}

.woocommerce div.product .uploader-sqft-mode .uploader-thumb-wrap {
    padding-left: 36px;
    margin-right: 6px;
}

.woocommerce div.product .uploader-sqft-mode .uploader-thumb-canvas {
    max-width: 120px;
    max-height: 120px;
}

.woocommerce div.product form.cart table.uploader_files_completed td {
    padding: 5px 9px;
    border: none;
    background: transparent;
}

.woocommerce div.product form.cart table.uploader_files_completed .completed.custom-uploaded-file>td {
    font-size: 95%;
}

.woocommerce div.product form.cart table.uploader_files_completed .warning.custom-uploaded-file>td {
    color: red;
    font-size: 90%;
}

.woocommerce div.product form.cart table.uploader_files_completed .custom-uploaded-file>td.uploader-sqin,
.woocommerce div.product form.cart table.uploader_files_completed .custom-uploaded-file>td.uploader-sqft,
.woocommerce div.product form.cart table.uploader_files_completed .custom-uploaded-file>td.uploader-price {
    text-align: center;
    text-overflow: clip;
    white-space: nowrap;
    overflow: hidden;
}

.woocommerce div.product form.cart table.uploader_files_completed input {
    text-align: center;
    padding: 5px;
    border: 1px solid #e7e7e7;
    display: inline-block;
    max-width: 70px;
    margin-bottom: 0;
}

.woocommerce div.product form.cart table.uploader_files_completed .uploader-unit {
    display: inline-block;
    margin-left: 5px;
}

.woocommerce div.product .uploader_file_controls {
    display: block;
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    line-height: 32px;
}

.woocommerce div.product .uploader_file_controls:before,
.uploader_file_controls:after {
    content: '';
    clear: both;
    display: table;
}

.woocommerce div.product .uploader_file_controls_title {
    float: left;
    font-weight: 600;
}

.woocommerce div.product .uploader_file_control_buttons {
    float: right;
}

.woocommerce div.product .gdwcu-switch-field {
    display: flex;
    margin-bottom: 0px;
    overflow: hidden;
}

.woocommerce div.product .gdwcu-switch-field input {
    position: absolute !important;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    width: 1px;
    border: 0;
    overflow: hidden;
}

.woocommerce div.product .gdwcu-switch-field label {
    background-color: #f4f4f4;
    color: rgba(0, 0, 0, 0.6);
    font-size: 14px;
    line-height: 1;
    text-align: center;
    padding: 8px 16px;
    margin-right: -1px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.1s ease-in-out;
    font-weight: 600;
    margin: 0;
}

.woocommerce div.product .gdwcu-switch-field label:hover {
    cursor: pointer;
}

.woocommerce div.product .gdwcu-switch-field input:checked+label {
    background-color: #03a9f4;
    box-shadow: none;
    color: #fff;
}

.woocommerce div.product .gdwcu-switch-field label:first-of-type {
    border-radius: 4px 0 0 4px;
}

.woocommerce div.product .gdwcu-switch-field label:last-of-type {
    border-radius: 0 4px 4px 0;
}
.custom-uploader-sqin-or-sqft-enabled.woocommerce div.product form.cart div.quantity .qty {
    display: none !important;
}
/* .custom-uploader-sqin-or-sqft-enabled .woocommerce .quantity .qty {
    display: none!important;
    min-width: 90px;
} */

/***********************************
************* Cart CSS *************
************************************/
.woocommerce-cart table.cart .quantity .qty {
    min-width: 90px;
}

/* The client-generated snapshot ( checkerboard + baked-in Width/Height labels ) shown per uploaded
   file on the Cart page. */
/* Sizing/border/spacing now come from an inline style written by render_snapshot_thumbnail_html() in
   class-woocommerce-custom-uploader.php (driven by the "Thumbnail Display Size" setting, and so that
   the same markup still looks right in order emails, which typically strip <style> blocks). This rule
   is just a fallback for anything unusual that strips inline styles instead. */
.uploader-cart-thumb {
    display: block;
    height: auto;
    margin: 4px 0 6px;
    border: 1px solid rgba(0, 0, 0, .15);
}

/* Lightbox for the above thumbnail, opened by includes/assets/js/uploader-lightbox.js on click - shows
   the same image ( already the full-resolution stored snapshot, only shrunk for the inline display via
   the block above ) at its actual size against a dimmed backdrop. Un-scoped ( not `.woocommerce ...` )
   since this overlay is appended directly to <body>, same reasoning as the resize popup on the product
   page. */
body.uploader-lightbox-open {
    overflow: hidden;
}

.uploader-lightbox-overlay {
    position: fixed;
    z-index: 100000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
    cursor: zoom-out;
}

.uploader-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
    cursor: default;
}

.uploader-lightbox-close {
    position: fixed;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 100001;
}

.woocommerce-cart table.cart .uploader_data_list {
    list-style-type: none;
    margin: 0;
}

.woocommerce-cart table.cart .uploader_data_list>li {
    padding-top: 3px;
    padding-bottom: 3px;
    padding-left: 15px;
    position: relative;
}

.woocommerce-cart table.cart .uploader_data_list>li:before,
.woocommerce-cart table.cart .uploader_data_list>li:after {
    content: '';
    clear: both;
    display: table;
}

.woocommerce-cart table.cart .uploader_data_item_disc {
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.woocommerce-cart table.cart .uploader_data_item {
    width: 100%;
    float: left;
    clear: both;
}

.woocommerce-cart table.cart .uploader_data_item:before,
.woocommerce-cart table.cart .uploader_data_item:after {
    content: '';
    clear: both;
    display: table;
}

.woocommerce-cart table.cart .uploader_data_name {
    float: left;
    width: auto;
    max-width: calc(100% - 55px);
    line-height: 30px;
}

.woocommerce-cart table.cart .uploader_data_qty {
    float: right;
    width: 55px;
}

.woocommerce-cart table.cart .uploader-data-qty {
    display: block;
    width: 100%;
    max-width: 65px;
    padding: 5px 13px;
    padding-right: 0px !important;
    font-size: 14px;
    height: 30px;
    line-height: 30px;
    box-sizing: border-box;
    text-align: center;
}

.woocommerce .cart table.uploader_data_table {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, .1);
    margin-top: 10px;
    font-size: 12px;
    width: 100%;
}

.woocommerce-cart table.cart table.uploader_data_table th,
.woocommerce-cart table.cart table.uploader_data_table td {
    padding: 15px 15px;
}

.woocommerce-cart table.cart table.uploader_data_table tbody th,
.woocommerce-cart table.cart table.uploader_data_table tfoot td,
.woocommerce-cart table.cart table.uploader_data_table tfoot th {
    border-top: 1px solid rgba(0, 0, 0, .1);
}

.woocommerce-cart table.cart table.uploader_data_table>thead>tr>th:nth-child(2) {
    min-width: 85px;
}

.woocommerce-cart table.cart table.uploader_data_table>thead>tr>th:nth-child(3) {
    min-width: 65px;
}

/***********************************
****** Product page thumbnail ******
************************************/
.woocommerce div.product .uploader-thumb-wrap {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    padding-top: 30px;
    padding-left: 52px;
}

/* Shrink-wraps to the canvas's actual rendered box by default, so the labels ( percentage-positioned
   against this element ) stay centered on the image regardless of its aspect ratio. For a very
   thin/short (extreme aspect ratio) image, JS ( gdriveSyncThumbBoxSize() ) grows this box past the
   canvas's own size with an explicit min-width/min-height, whenever the canvas alone would be
   narrower/shorter than its own dimension label needs to be - the flex centering here is what keeps
   the actual image centered (both horizontally and vertically) inside that enlarged box rather than
   pinned to one corner. */
.woocommerce div.product .uploader-thumb-imgbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: top;
}

.woocommerce div.product .uploader-thumb-wrap.uploader-thumb-ready {
    cursor: zoom-in;
}

.woocommerce div.product .uploader-thumb-wrap.uploader-thumb-ready:hover .uploader-thumb-canvas {
    border-color: #0009C8;
}

.woocommerce div.product .uploader-thumb-canvas {
    display: block;
    max-width: 160px;
    max-height: 160px;
    border: 1px solid rgba(0, 0, 0, .15);
    background-color: #fff;
}

.woocommerce div.product .uploader-thumb-wrap.uploader-thumb-unavailable .uploader-thumb-canvas {
    display: none;
}

/* Fallback placeholder icon shown when a preview couldn't be generated ( e.g. an exotic/unsupported
   TIFF variant ) - the actual file upload is completely unaffected either way. */
.woocommerce div.product .uploader-thumb-wrap.uploader-thumb-unavailable:after {
    content: "";
    display: block;
    width: 60px;
    height: 60px;
    border: 1px dashed rgba(0, 0, 0, .25);
    border-radius: 3px;
    background-color: #f5f5f5;
}

/* Un-scoped on purpose: the resize popup renders its own copy of these labels appended directly to
   <body>, outside the ".woocommerce div.product" wrapper the rest of this stylesheet is scoped to. */
.uploader-dim-label {
    position: absolute;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    color: #222;
    background: rgba(255, 255, 255, .85);
    padding: 3px 6px;
    border-radius: 2px;
    white-space: nowrap;
    pointer-events: none;
}

/* Horizontally centered above the image's top edge. */
.woocommerce div.product .uploader-dim-label.uploader-dim-top {
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
}

/* Vertically centered along the image's left edge, reading bottom-to-top. Every attempt at this using
   `rotate(-90deg)` on a normal horizontal-text box turned out to have the same underlying flaw: CSS
   `transform-origin`'s default (the box's own center) is calculated from the box's WIDTH, and that width
   is exactly what changes with the text ("16inch" vs "10.57inch") - so the rotation pivot always drifted
   sideways as the text got longer, no matter which edge (`left` or `right`) the box was positioned from,
   or how large a fixed width was used to try to compensate (a bigger fixed width just moved the pivot by
   a bigger constant amount, eventually pushing it off-screen entirely).
   The fix is to stop rotating a horizontal text box after the fact, and instead lay the text out
   NATIVELY vertically with `writing-mode`, the same way CJK vertical text (or a chart's Y-axis label)
   works. Under `writing-mode: vertical-rl`, the box's WIDTH becomes a small constant ( roughly one
   character's worth ) and its HEIGHT becomes the text's own length - which is the opposite, and correct,
   relationship for what we're positioning: `right: 100%` ( width-independent, since width is now small
   and constant ) keeps it a fixed distance from the image regardless of text length, and
   `translateY(-50%)` ( which uses the box's own height - now equal to the full text run - as its
   percentage basis ) correctly centers the WHOLE label on the image's vertical middle no matter how long
   the text is. `rotate(180deg)` flips `vertical-rl`'s default top-to-bottom/clockwise-character reading
   into the bottom-to-top/counter-clockwise-character orientation we want ( matching the old rotate(-90deg)
   look ), and a 180-degree rotation is symmetric around the box's center, so unlike -90deg it introduces
   no directional drift at all. */
.woocommerce div.product .uploader-dim-label.uploader-dim-left {
    top: 50%;
    right: 100%;
    margin-right: 8px;
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
}

/***********************************
****** Resize popup ( product page ) ******
************************************/
body.uploader-resize-popup-active {
    overflow: hidden;
}

.uploader-resize-popup {
    display: none;
    position: fixed;
    z-index: 100000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.uploader-resize-popup.open {
    display: block;
}

.uploader-resize-popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .6);
}

.uploader-resize-popup-panel {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
    display: flex;
    box-sizing: border-box;
    padding: 20px;
}

.uploader-resize-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    padding: 5px 10px;
}

/* 3x3 grid: corner spacers, top/bottom horizontal rulers, left/right vertical rulers, and the
   interactive viewport in the middle. DOM order (corner, ruler-top, corner, ruler-left, viewport,
   ruler-right, corner, ruler-bottom, corner) matches this layout row by row. */
.uploader-resize-popup-stage {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: 38px 1fr 38px;
    grid-template-rows: 38px 1fr 38px;
    background: #fafafa;
    border-radius: 3px;
    overflow: hidden;
}

.uploader-resize-popup-corner {
    background: #f4f4f4;
}

.uploader-resize-popup-ruler {
    display: block;
    background: #f4f4f4;
}

.uploader-resize-popup-ruler-top,
.uploader-resize-popup-ruler-bottom {
    width: 100%;
    height: 38px;
}

.uploader-resize-popup-ruler-left,
.uploader-resize-popup-ruler-right {
    width: 38px;
    height: 100%;
}

.uploader-resize-popup-viewport {
    position: relative;
    overflow: hidden;
    touch-action: none;
    cursor: default;
}

.uploader-resize-popup-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.uploader-resize-handle {
    position: absolute;
    width: 18px;
    height: 18px;
    margin-left: -9px;
    margin-top: -9px;
    background: #0009C8;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, .4);
    touch-action: none;
    z-index: 2;
}

.uploader-resize-handle.handle-tl,
.uploader-resize-handle.handle-br {
    cursor: nwse-resize;
}

.uploader-resize-handle.handle-tr,
.uploader-resize-handle.handle-bl {
    cursor: nesw-resize;
}

.uploader-resize-handle.dragging {
    background: #ff5722;
}

.uploader-popup-dim-top,
.uploader-popup-dim-left {
    font-size: 16px;
    z-index: 1;
}

/* Same pattern as the inline product-page thumbnail's labels ( already confirmed working there ) -
   `left`/`top` here are set in JS as absolute pixel anchor points ( image top-center / left-middle ),
   the transform just centers the label on that anchor. */
.uploader-popup-dim-top {
    transform: translateX(-50%);
}

/* Same writing-mode fix as the inline thumbnail's Height label ( see the long comment on
   .uploader-dim-label.uploader-dim-left for the full rotate(-90deg)-vs-writing-mode explanation ).
   JS still computes `right` as a plain pixel value each render, which stays correct here since
   writing-mode makes this box's WIDTH small and constant regardless of text length. */
.uploader-popup-dim-left {
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
}

.uploader-resize-popup-fields {
    /* 4.2.1: wider. 220px was sized for three number fields and two buttons; it has to
       hold the spot layer list now, and at 220px the filenames were ellipsised almost to
       nothing and the list sat below the fold. The stage loses the width happily - it had
       far more than the artwork needed since the zoom-to-image change. */
    flex: 0 0 330px;
    padding-left: 22px;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Forced to `display:block; width:100%` explicitly, rather than relying on default button flow -
   both buttons are the same width this way regardless of their label length, and stack with a
   guaranteed gap ( margin-bottom on Reset ) so there's no risk of clicking one when meaning the other.
   `!important` throughout: the theme/WooCommerce's own `.button` styling was overriding the plain
   ( non-important ) version of these rules - most likely a `margin: 0 !important` reset on buttons
   somewhere upstream - which is why Reset and Apply were still touching with no gap between them. */
.uploader-resize-popup-fields .uploader-resize-popup-reset,
.uploader-resize-popup-fields .uploader-resize-popup-apply {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.uploader-resize-popup-reset {
    margin-top: 0 !important;
    margin-bottom: 14px !important;
}

.uploader-resize-popup-apply {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
}

.uploader-resize-popup-fields label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 13px;
}

.uploader-resize-popup-fields input {
    width: 100px;
    padding: 6px;
    font-size: 14px;
    margin-top: 4px;
}

.uploader-resize-popup-filename {
    font-weight: 700;
    font-size: 13px;
    word-break: break-word;
    margin-top: 30px;
    margin-bottom: 20px;
}

.uploader-resize-popup-warning {
    color: #d63638;
    font-size: 12px;
}

.uploader-resize-popup-hint {
    color: #777;
    font-size: 11px;
    margin-top: 20px;
}

@media (max-width: 782px) {
    .uploader-resize-popup-panel {
        flex-direction: column;
        top: 5%;
        left: 5%;
        width: 90%;
        height: 90%;
    }

    .uploader-resize-popup-fields {
        flex: 0 0 auto;
        padding-left: 0;
        padding-top: 15px;
    }
}
/* ------------------------------------------------------------------------------------
 * 3.1.8 - width / height / quantity fields
 *
 * Two problems being fixed here.
 *
 * 1. The fields were capped at 70px with 5px padding, which on a value like "4.96" left
 *    the number clipped and all but unreadable - the browser's own spinner arrows were
 *    eating roughly 17px of that width before the text even started.
 *
 * 2. The native spinner stepped width/height by a whole 1. The inputs carry step="any"
 *    on purpose ( it is what stopped the old "Enter a valid value" errors blocking Add
 *    to Cart ), and with step="any" browsers fall back to stepping by 1 - which means a
 *    full inch per click. The arrows are hidden here and replaced by the - / + buttons
 *    the JS adds, which step by 0.1 in inch and 1 in mm.
 *
 * Deliberately NOT touching step/validation in any way; this is presentation only.
 * ---------------------------------------------------------------------------------- */

.woocommerce div.product form.cart table.uploader_files_completed .uploader-size-field {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
}

.woocommerce div.product form.cart table.uploader_files_completed input.uploader-size-input,
.woocommerce div.product form.cart table.uploader_files_completed input.uploader-qty-input {
    /* 16px, not em: anything smaller makes iOS Safari zoom the whole page in on focus. */
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    padding: 7px 6px;
    max-width: none;
    width: 78px;
    border-radius: 4px;
}

.woocommerce div.product form.cart table.uploader_files_completed input.uploader-qty-input {
    width: 68px;
}

/* Hide the native spinner - the - / + buttons replace it. */
.woocommerce div.product form.cart table.uploader_files_completed input.uploader-size-input::-webkit-outer-spin-button,
.woocommerce div.product form.cart table.uploader_files_completed input.uploader-size-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce div.product form.cart table.uploader_files_completed input.uploader-size-input {
    -moz-appearance: textfield;
    appearance: textfield;
}

.woocommerce div.product form.cart table.uploader_files_completed .uploader-step-btn {
    flex: 0 0 auto;
    width: 30px;
    height: 34px;
    min-height: 0;
    padding: 0;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    color: #333;
    background: #f1f1f1;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    cursor: pointer;
    /* Repeated taps on a touch screen must not select the glyph or fire a zoom. */
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.woocommerce div.product form.cart table.uploader_files_completed .uploader-step-btn:hover {
    background: #e4e4e4;
}

.woocommerce div.product form.cart table.uploader_files_completed .uploader-step-btn:active {
    background: #d8d8d8;
}

@media (max-width: 782px) {

    .woocommerce div.product form.cart table.uploader_files_completed input.uploader-size-input {
        width: 64px;
    }

    .woocommerce div.product form.cart table.uploader_files_completed input.uploader-qty-input {
        width: 58px;
    }

    .woocommerce div.product form.cart table.uploader_files_completed .uploader-step-btn {
        width: 26px;
        height: 32px;
    }
}

/* ------------------------------------------------------------------------------------
 * 3.2.4 - keep the real <input type="file"> hidden
 *
 * The input carries the HTML `hidden` attribute, and until now that was the ONLY thing
 * hiding it. Browsers implement `hidden` as a user-agent rule of essentially zero
 * specificity, so any theme or page builder shipping something as ordinary as
 *
 *     input[type="file"] { display: block; }
 *
 * beats it, and the raw "Choose Files / no files selected" control appears underneath the
 * drop zone. It looked fine on one site and broken on another purely by theme luck.
 *
 * display:none is safe here: the file dialog is opened by <label for="custom_uploader_field">,
 * and label activation works on a hidden input - the input itself never needs to be clickable.
 * ---------------------------------------------------------------------------------- */

input#custom_uploader_field,
input.custom-upload[type="file"],
.woocommerce div.product input.custom-upload,
.woocommerce div.product form.cart input.custom-upload {
    display: none !important;
}

/* ---------------------------------------------------------------------------
   v4.1.0 - uploader option groups
   Real radio inputs underneath, card look on top. The radio itself is hidden
   from sight but NOT from assistive tech or keyboard focus, so the group stays
   navigable with arrow keys and announces correctly.
   --------------------------------------------------------------------------- */

.uploader-options {
    margin: 0 0 18px;
}

.uploader-option-group {
    border: 0;
    margin: 0 0 16px;
    padding: 0;
}

.uploader-option-legend {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
    padding: 0;
}

.uploader-option-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.uploader-option-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 180px;
    min-width: 160px;
    max-width: 280px;
    margin: 0;
    padding: 12px;
    border: 2px solid #e3e6ec;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.uploader-option-choice:hover {
    border-color: #b9c0cd;
}

/* Clipped rather than display:none - a display:none radio is removed from the
   tab order and from some screen readers entirely. */
.uploader-option-choice input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.uploader-option-choice:has(input[type="radio"]:checked),
.uploader-option-choice.is-selected {
    border-color: #1b4fd8;
    background: #f5f8ff;
}

.uploader-option-choice:has(input[type="radio"]:focus-visible),
.uploader-option-choice.is-focused {
    outline: 2px solid #1b4fd8;
    outline-offset: 2px;
}

.uploader-option-image {
    display: block;
    margin: 0 0 10px;
}

.uploader-option-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.uploader-option-text {
    display: block;
}

.uploader-option-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.uploader-option-desc {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.4;
    opacity: .75;
}

@media screen and (max-width: 782px) {
    .uploader-option-choice {
        flex: 1 1 100%;
        max-width: none;
    }
}

/* ---------------------------------------------------------------------------
   v4.1.1 - spot colour layers
   One layer per row, each in its own roomy box. Earlier this was a wrapping
   inline flex row, which cramped the controls and let the status text overlap
   the file button - and the size-mismatch message is the one thing here that
   must never be hard to read.
   --------------------------------------------------------------------------- */

.uploader-spot-row > td {
    padding: 10px 12px 16px;
    background: #f7f9fc;
    border-top: 0;
}

/* 5.2.0: collapsed by default - five neon slots per design, across several designs,
   buried the uploaded file list entirely. */
.uploader-spot-list {
    display: none;
}

.uploader-spot-row.is-open .uploader-spot-list {
    display: block;
    margin-top: 10px;
}

.uploader-spot-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 9px;
    font: inherit;
    font-size: 14px;
    text-align: left;
    color: inherit;
    cursor: pointer;
}

.uploader-spot-toggle:hover {
    border-color: #c2cbdb;
}

.uploader-spot-row.has-error .uploader-spot-toggle {
    border-color: #a3261a;
    background: #fdf2f0;
}

.uploader-spot-toggle-caret {
    flex: 0 0 auto;
    width: 0;
    height: 0;
    border-left: 6px solid #55607a;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    transition: transform .15s ease;
}

.uploader-spot-row.is-open .uploader-spot-toggle-caret {
    transform: rotate(90deg);
}

.uploader-spot-toggle-label {
    flex: 0 0 auto;
    font-weight: 600;
}

/* The summary is what makes a collapsed panel readable - without it the customer has to
   open every design to find out whether they have chosen anything. */
.uploader-spot-toggle-summary {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    color: #55607a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uploader-spot-row.has-error .uploader-spot-toggle-summary {
    color: #a3261a;
    font-weight: 600;
}

.uploader-spot-layer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 12px 14px;
    margin: 0 0 8px;
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 10px;
}

.uploader-spot-layer:last-child {
    margin-bottom: 0;
}

.uploader-spot-layer.is-ticked {
    border-color: #1b4fd8;
    box-shadow: inset 3px 0 0 #1b4fd8;
}

/* Grouped layers are pick-one-of. The dashed left edge says they belong together
   without needing a wrapper element around them. */
.uploader-spot-layer.is-grouped {
    border-left: 3px dashed #c7cedb;
}

.uploader-spot-layer.is-grouped.is-ticked {
    border-left: 3px solid #1b4fd8;
}

.uploader-spot-tick {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex: 1 1 240px;
    font-size: 15px;
    cursor: pointer;
}



.uploader-spot-file {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
}

/* 4.3.1: the layer's upload control is a drop target, matching the main dropzone rather
   than exposing the browser's unstyleable native file button. */
.uploader-spot-drop {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 230px;
    min-height: 42px;
    padding: 8px 16px;
    background: #f7f9fc;
    border: 2px dashed #c2cbdb;
    border-radius: 9px;
    font-size: 13px;
    color: #55607a;
    cursor: pointer;
}

.uploader-spot-drop:hover {
    border-color: #1b4fd8;
    background: #eef3ff;
}

.uploader-spot-drop b {
    color: #1b4fd8;
}

/* The real input, laid over the whole box at zero opacity: a click anywhere opens the
   picker, and the control stays a genuine file input for keyboard and screen readers.
   `font-size: 0` stops the native button's text forcing a minimum width underneath. */
.uploader-spot-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-size: 0;
    opacity: 0;
    cursor: pointer;
}

/* Full width on its own line - never beside the file button, where a long message
   used to run straight over it. order:9 keeps it last whatever the markup order, and
   width:100% means a theme that resets flex-basis cannot pull it back up onto the
   button's line. */
.uploader-spot-status {
    order: 9;
    flex: 1 1 100%;
    width: 100%;
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
    overflow-wrap: break-word;
}

.uploader-spot-status:empty {
    display: none;
}

.uploader-spot-status.is-ok {
    color: #1a7f3c;
}

.uploader-spot-status.is-error {
    color: #a3261a;
    font-weight: 600;
    padding: 8px 10px;
    background: #fdf2f0;
    border-radius: 6px;
}

@media screen and (max-width: 782px) {
    .uploader-spot-tick,
    .uploader-spot-file {
        flex: 1 1 100%;
    }

    .uploader-spot-drop {
        width: 100%;
        min-width: 0;
    }
}

/* ---------------------------------------------------------------------------
   v4.2.0 - spot layer panel inside the resize popup
   --------------------------------------------------------------------------- */

.uploader-popup-layers {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e3e6ec;
}

.uploader-popup-layers-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #55607a;
}

.uploader-popup-layer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    margin: 0 0 6px;
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 9px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.uploader-popup-layer-row:hover {
    border-color: #c2cbdb;
}

/* The base design sits at the bottom of the list because it sits at the bottom of the
   stack. Set apart so it does not read as just another mask. */
.uploader-popup-layer-row.is-base {
    margin-top: 10px;
    border-style: dashed;
    border-color: #c7cedb;
}

.uploader-popup-layer-row.is-off {
    opacity: .45;
}

.uploader-popup-eye {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: #1b4fd8;
}

.uploader-popup-layer-row.is-off .uploader-popup-eye {
    color: #8a93a3;
}

/* A sample of this layer's ant line, so the colour on the canvas is identifiable. */
.uploader-popup-layer-swatch {
    flex: 0 0 34px;
    width: 34px;
    height: 0;
    border-top: 3px dashed #999;
}

.uploader-popup-layer-swatch.is-solid {
    border-top-style: solid;
    border-top-color: #c7cedb;
}

.uploader-popup-layer-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uploader-popup-layers-note {
    margin: 12px 0 0;
    padding: 10px 12px;
    background: #f3f6fb;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #44506b;
}

/* Drag and drop on a layer's upload box. */
.uploader-spot-layer.is-dragover {
    border-color: #1b4fd8;
    background: #eef3ff;
}


/* ---------------------------------------------------------------------------
   v4.2.1 - popup panel laid out in rows rather than one tall column
   --------------------------------------------------------------------------- */

.uploader-resize-popup-dims {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    margin-bottom: 14px;
}

/* Quantity gets its own full-width row under Width/Height. */
.uploader-resize-popup-dims .uploader-resize-popup-qty-label {
    grid-column: 1 / -1;
}

.uploader-resize-popup-dims label {
    margin: 0 !important;
    font-size: 13px;
    line-height: 1.5;
}

.uploader-resize-popup-dims input {
    width: 100%;
    box-sizing: border-box;
}

.uploader-resize-popup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

/* These two were forced to display:block/width:100% with !important to beat the theme's
   button styling. Inside the grid they are cells, so that override has to be undone just
   as forcefully or they stack again. */
.uploader-resize-popup-fields .uploader-resize-popup-actions .uploader-resize-popup-reset,
.uploader-resize-popup-fields .uploader-resize-popup-actions .uploader-resize-popup-apply {
    width: 100% !important;
    margin: 0 !important;
}

@media screen and (max-width: 860px) {
    .uploader-resize-popup-fields {
        flex: 0 0 100%;
    }
}

/* ---------------------------------------------------------------------------
   v4.3.4 - spot layer cost breakdown under a cart line
   One row per design: filename, its layers, its charge aligned right. Two
   designs running together in one wrapped paragraph defeated the whole point.
   --------------------------------------------------------------------------- */

.uploader-spot-cost {
    margin: 2px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.uploader-spot-cost-row {
    margin: 0 0 6px !important;
    padding: 6px 8px;
    background: #f7f9fc;
    border-radius: 6px;
    list-style: none !important;
}

.uploader-spot-cost-row:last-child {
    margin-bottom: 0 !important;
}

/* A single design needs no box - the filename is already directly above it. */
.uploader-spot-cost-row:only-child {
    padding: 0;
    background: none;
}

.uploader-spot-cost-design {
    display: block;
    font-weight: 600;
    font-size: 12.5px;
    line-height: 1.5;
    word-break: break-all;
}

.uploader-spot-cost-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.uploader-spot-cost-layers {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12.5px;
    line-height: 1.5;
}



/* 4.3.4: give the totals block's label column room. The spot layer rows carry a design
   name, and WooCommerce's default narrow <th> wrapped them over several lines. */
.woocommerce-cart-form ~ .cart-collaterals .cart_totals th,
.cart_totals table th {
    width: 42%;
    word-break: break-word;
}

/* 4.4.0: the spot charge now rides in the line's own price, so the subtotal says what it
   is made of. Without this the number simply jumps from $0.30 to $60.30 with the unit
   price still reading $0.15, and nothing on screen connects the two. */


/* ------------------------------------------------------------------------------------------------
   5.3.0 / 5.5.0 - Import from a Google Drive / Dropbox link
   ------------------------------------------------------------------------------------------------ */

/* Red outline: tells a link-imported file apart from a normal upload ( its preview is on white ). */
.woocommerce div.product .uploader-thumb-wrap.uploader-thumb-linked .uploader-thumb-canvas,
.woocommerce div.product .uploader-thumb-wrap.uploader-thumb-linked.uploader-thumb-ready:hover .uploader-thumb-canvas {
    border: 2px solid #d63638;
}
.woocommerce div.product .uploader-thumb-wrap.uploader-thumb-linked.uploader-thumb-unavailable:after {
    border: 2px solid #d63638;
}
.woocommerce div.product .uploader-linked-note {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.4;
    color: #d63638;
}

.woocommerce div.product .uploader_link_import {
    margin: 0 0 6px;
}
.woocommerce div.product .uploader-link-or {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0 14px;
}
.woocommerce div.product .uploader-link-or i {
    flex: 1;
    height: 1px;
    background: #e2e5ef;
}
.woocommerce div.product .uploader-link-or b {
    font-size: 13px;
    font-weight: 700;
    color: #5b6275;
    background: #f1f3f9;
    border-radius: 999px;
    padding: 3px 14px;
}
.woocommerce div.product .uploader-link-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.woocommerce div.product .uploader-link-title img {
    flex: none;
    width: 32px;
    height: 32px;
}
.woocommerce div.product .uploader-link-title label {
    margin: 0 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #121A5A;
}
.woocommerce div.product .uploader-link-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1.5px solid #d5daea;
    border-radius: 14px;
    padding: 5px 5px 5px 14px;
}
.woocommerce div.product .uploader-link-row:focus-within {
    border-color: #121A5A;
}
.woocommerce div.product .uploader-link-icon {
    flex: none;
    color: #7a8299;
}
.woocommerce div.product input.uploader-link-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    font-size: 16px;
}
.woocommerce div.product .uploader-link-row .uploader-link-read.button {
    flex: none;
    margin: 0;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: #121A5A;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
}
.woocommerce div.product .uploader-link-help {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #5b6275;
}
.woocommerce div.product .uploader-link-q {
    all: unset;
    box-sizing: border-box;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 6px;
    vertical-align: -6px;
    border-radius: 50%;
    background: #121A5A;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s;
}
.woocommerce div.product .uploader-link-q:hover {
    transform: scale(1.12);
}
.woocommerce div.product .uploader-link-q:focus-visible {
    outline: 3px solid #8fa0ff;
    outline-offset: 2px;
}
.woocommerce div.product .uploader-link-q::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid #121A5A;
    animation: wcu-ping 2.4s ease-out infinite;
    pointer-events: none;
}
@keyframes wcu-ping {
    0% { transform: scale(.7); opacity: .7; }
    70%, 100% { transform: scale(1.5); opacity: 0; }
}

/* Results card ( "Clean Cards" ) */
.woocommerce div.product .uploader-link-results:empty {
    display: none;
}
.woocommerce div.product .uploader-link-results {
    margin-top: 12px;
    background: #fff;
    border: 1.5px solid #e2e5ef;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(18, 26, 90, .07);
    overflow: hidden;
}
.woocommerce div.product .uploader-link-results > .uploader-link-msg {
    margin: 0;
    padding: 14px 18px;
}
.woocommerce div.product .uploader-link-bar {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 18px;
    background: #d63638;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}
.woocommerce div.product .uploader-link-bar svg {
    flex: none;
    margin-top: 1px;
}
.woocommerce div.product .uploader-link-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 18px 6px;
    color: #121A5A;
    font-size: 16px;
}
.woocommerce div.product .uploader-link-provider {
    font-size: 12px;
    font-weight: 700;
    color: #3b4256;
    background: #f3f5fa;
    border-radius: 999px;
    padding: 2px 10px;
}
.woocommerce div.product .uploader-link-error,
.woocommerce div.product .uploader-link-bad {
    color: #d63638;
}
.woocommerce div.product .uploader-link-good {
    color: #1a7f37;
    font-weight: 600;
}
.woocommerce div.product .uploader-link-working {
    color: #121A5A;
}
.woocommerce div.product .uploader-link-note {
    margin: 2px 18px 6px;
    font-size: 12px;
    color: #8a5a00;
}
.woocommerce div.product ul.uploader-link-list {
    list-style: none;
    margin: 4px 0;
    padding: 0 10px;
    max-height: 360px;
    overflow-y: auto;
}
.woocommerce div.product .uploader-link-item {
    margin: 0 0 6px;
    padding: 0;
    border-radius: 10px;
    background: #f8f9fc;
}
.woocommerce div.product .uploader-link-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 10px 12px;
    cursor: pointer;
}
.woocommerce div.product .uploader-link-item input[type=checkbox] {
    width: 20px;
    height: 20px;
    flex: none;
    accent-color: #121A5A;
}
.woocommerce div.product .uploader-link-rejected label {
    cursor: default;
    opacity: .7;
}
.woocommerce div.product .uploader-link-thumb {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #d63638;
    border-radius: 4px;
    background: #f1f1f1;
}
.woocommerce div.product .uploader-link-thumb img {
    max-width: 44px;
    max-height: 44px;
}
.woocommerce div.product .uploader-link-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-size: 13px;
    line-height: 1.35;
}
.woocommerce div.product .uploader-link-name {
    font-size: 15px;
    font-weight: 700;
    color: #1d2233;
    overflow-wrap: anywhere;
}
.woocommerce div.product .uploader-link-meta {
    color: #5b6275;
}
.woocommerce div.product .uploader-link-status {
    font-size: 12px;
}
.woocommerce div.product .uploader-link-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px 16px;
}
.woocommerce div.product .uploader-link-limit {
    margin-right: auto;
    font-size: 13px;
    color: #5b6275;
}
.woocommerce div.product .uploader-link-actions .button {
    margin: 0;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    font-weight: 700;
}
.woocommerce div.product .uploader-link-actions .uploader-link-import,
.woocommerce div.product .uploader-link-actions .uploader-link-retry {
    background: #121A5A;
    color: #fff;
    border: 0;
}
.woocommerce div.product .uploader-link-actions .uploader-link-clear {
    background: #fff;
    color: #121A5A;
    border: 1.5px solid #d5daea;
}

/* "How do I share my link?" popup - moved to <body> by the JS, so not scoped to .product. */
.wcu-help-veil {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(10, 14, 30, .35);
}
.wcu-help-veil[hidden] {
    display: none;
}
.wcu-help {
    position: relative;
    box-sizing: border-box;
    width: 75vw;
    max-width: 1100px;
    max-height: 92vh;
    overflow: auto;
    padding: 26px;
    border-radius: 20px;
    background: #fff;
    color: #1d2233;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
    animation: wcu-popin .3s cubic-bezier(.2, 1.4, .4, 1);
    text-align: left;
}
@keyframes wcu-popin {
    from { transform: scale(.9); opacity: 0; }
    to { transform: none; opacity: 1; }
}
.wcu-help .wcu-help-x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #121A5A;
    color: #fff;
    font-size: 22px;
    line-height: 46px;
    text-align: center;
    cursor: pointer;
}
.wcu-help h2 {
    margin: 0 56px 4px 0;
    font-size: 22px;
    line-height: 1.2;
    color: #121A5A;
}
.wcu-help .wcu-help-lead {
    margin: 0 0 18px;
    font-size: 14px;
    color: #5b6275;
}
.wcu-help .wcu-help-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.wcu-help .wcu-help-col {
    padding: 14px;
    border: 1px solid #e3e6ef;
    border-radius: 14px;
    background: #fafbfe;
}
.wcu-help .wcu-help-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 700;
    color: #121A5A;
}
.wcu-help .wcu-help-head img {
    width: 28px;
    height: 28px;
}
.wcu-help svg.ani {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e3e6ef;
    border-radius: 10px;
    background: #fff;
}
.wcu-help .wcu-help-steps {
    margin: 12px 0 0;
    padding-left: 20px;
    font-size: 14px;
}
.wcu-help .wcu-help-steps li {
    margin: 3px 0;
}
.wcu-help .wcu-help-got {
    display: block;
    margin: 22px auto 0;
    min-height: 50px;
    padding: 0 40px;
    border: 0;
    border-radius: 999px;
    background: #121A5A;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.wcu-help .wcu-help-x:focus-visible,
.wcu-help .wcu-help-got:focus-visible {
    outline: 3px solid #8fa0ff;
    outline-offset: 2px;
}
body.wcu-help-open {
    overflow: hidden;
}
@media (max-width: 700px) {
    .wcu-help {
        width: 100%;
        padding: 20px 16px;
    }
    .wcu-help .wcu-help-cols {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (prefers-reduced-motion: reduce) {
    .woocommerce div.product .uploader-link-q::after,
    .wcu-help {
        animation: none;
    }
}
/* ---------- shared SVG animation: 12 s loop, four scenes of 3 s ---------- */
.wcu-help .ani text{font-family:inherit}
.wcu-help .sc{opacity:0}
.wcu-help .sc1{animation:wcu-sc1 12s infinite}.wcu-help .sc2{animation:wcu-sc2 12s infinite}.wcu-help .sc3{animation:wcu-sc3 12s infinite}.wcu-help .sc4{animation:wcu-sc4 12s infinite}
@keyframes wcu-sc1{0%,23%{opacity:1}25%,100%{opacity:0}}
@keyframes wcu-sc2{0%,24%{opacity:0}26%,48%{opacity:1}50%,100%{opacity:0}}
@keyframes wcu-sc3{0%,49%{opacity:0}51%,73%{opacity:1}75%,100%{opacity:0}}
@keyframes wcu-sc4{0%,74%{opacity:0}76%,98%{opacity:1}100%{opacity:0}}
.wcu-help .hl1{animation:wcu-hl1 12s infinite}.wcu-help .hl2{animation:wcu-hl2 12s infinite}.wcu-help .hl3{animation:wcu-hl3 12s infinite}.wcu-help .hl4{animation:wcu-hl4 12s infinite}
@keyframes wcu-hl1{0%,13%{opacity:0}15%,24%{opacity:1}25%,100%{opacity:0}}
@keyframes wcu-hl2{0%,38%{opacity:0}40%,49%{opacity:1}50%,100%{opacity:0}}
@keyframes wcu-hl3{0%,63%{opacity:0}65%,74%{opacity:1}75%,100%{opacity:0}}
@keyframes wcu-hl4{0%,86%{opacity:0}88%,98%{opacity:1}100%{opacity:0}}
.wcu-help .gcur{animation:wcu-gcur 12s infinite}
@keyframes wcu-gcur{
 0%{transform:translate(300px,215px)}8%,12%{transform:translate(150px,98px)}17%,24%{transform:translate(205px,125px)}
 25%{transform:translate(240px,215px)}38%,49%{transform:translate(150px,148px)}
 50%{transform:translate(150px,148px)}63%,74%{transform:translate(170px,190px)}
 75%{transform:translate(260px,220px)}86%,100%{transform:translate(78px,206px)}}
.wcu-help .dcur{animation:wcu-dcur 12s infinite}
@keyframes wcu-dcur{
 0%{transform:translate(200px,215px)}13%,24%{transform:translate(300px,100px)}
 25%{transform:translate(220px,230px)}38%,49%{transform:translate(78px,212px)}
 50%,74%{transform:translate(380px,300px)}
 75%{transform:translate(200px,220px)}88%,100%{transform:translate(280px,128px)}}
@media(prefers-reduced-motion:reduce){.wcu-help .gcur,.wcu-help .dcur{animation:none;opacity:0}.wcu-help .sc,.wcu-help .hl1,.wcu-help .hl2,.wcu-help .hl3,.wcu-help .hl4{animation-duration:24s}}


/* 5.3.2: white-background notice inside the resize popup ( popup lives outside .woocommerce ). */
.uploader-resize-popup-linked-note {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: #d63638;
}

/* 5.4.0: responsibility notice under the link box. */
.woocommerce div.product .uploader-link-responsibility {
    display: inline-block;
    margin-top: 3px;
    color: #d63638;
    font-weight: 600;
}
