/* ---- Print-produkt (foto + print-omr\u00e5de) frontend styles ---- */

body.visaro-has-designer #CookiebotWidget,
body.visaro-has-designer .CookiebotWidget,
body.visaro-has-designer [id^="CookiebotWidget"],
body.visaro-has-designer .cky-btn-revisit-wrapper,
body.visaro-has-designer #cmplz-manage-consent,
body.visaro-has-designer button.cmplz-manage-consent,
body.visaro-has-designer .cc-revoke,
body:has(.visaro-print-configurator) #CookiebotWidget,
body:has(.visaro-print-configurator) .cky-btn-revisit-wrapper {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Same 50/50 split as ordinary shop products. Do not mix 52% + 50% —
   that wraps the summary under the image on wide screens. */
body.visaro-print-product.woocommerce div.product .product-images-summary {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
}

body.visaro-print-product.woocommerce div.product div.visaro-print-gallery,
body.visaro-print-product.woocommerce div.product div.summary {
    float: none;
    width: 50%;
    max-width: 50%;
    box-sizing: border-box;
    margin-top: 0;
}

body.visaro-print-product.woocommerce div.product div.visaro-print-gallery,
body.visaro-print-product .visaro-print-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

body.visaro-print-product .visaro-print-gallery .flex-control-nav,
body.visaro-print-product .visaro-print-gallery .woocommerce-product-gallery__trigger,
body.visaro-print-product .breadcrumb-title-wrapper,
body.visaro-has-designer .breadcrumb-title-wrapper {
    display: none !important;
}

.visaro-print-thumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.visaro-print-thumb {
    position: relative;
    appearance: none;
    margin: 0;
    padding: 0;
    width: 64px;
    height: 64px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    cursor: pointer;
}

.visaro-print-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visaro-print-thumb.is-selected {
    border-color: #161616;
}

.visaro-print-thumb-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px 0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    color: #fff;
    background: rgba(22, 22, 22, 0.72);
}

.visaro-print-gallery.is-viewing-gallery .visaro-print-blend,
.visaro-print-gallery.is-viewing-gallery .visaro-print-admin-overlay {
    visibility: hidden;
    pointer-events: none;
}

.visaro-print-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 10px;
    line-height: 1.4;
}

.visaro-print-field {
    margin: 0 0 18px;
}

.visaro-print-field > label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.visaro-print-add-line {
    display: inline-block;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: #161616;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

body.visaro-print-product.woocommerce div.product div.summary {
    display: flex;
    flex-direction: column;
}

body.visaro-print-product.woocommerce div.product div.summary > .product_title {
    order: 0;
}

body.visaro-print-product.woocommerce div.product div.summary > .price {
    order: 1;
    margin: 0 0 12px;
}

body.visaro-print-product.woocommerce div.product div.summary > .detail-meta-top {
    order: 2;
}

body.visaro-print-product.woocommerce div.product div.summary > .visaro-print-summary-fields {
    order: 3;
}

body.visaro-print-product.woocommerce div.product div.summary > .meta-content {
    order: 4;
}

body.visaro-print-product .visaro-print-summary-fields .cart.visaro-print-cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

body.visaro-print-product .visaro-print-summary-fields .cart.visaro-print-cart .quantity {
    margin: 0;
}

body.visaro-print-product .visaro-print-summary-fields .cart.visaro-print-cart .single_add_to_cart_button {
    flex: 1 1 160px;
    margin: 0;
    float: none;
}

.visaro-print-snap-guides {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

.visaro-print-snap-x,
.visaro-print-snap-y {
    position: absolute;
    pointer-events: none;
    display: none;
}

.visaro-print-snap-x.is-visible,
.visaro-print-snap-y.is-visible {
    display: block;
}

.visaro-print-snap-x {
    top: -8px;
    bottom: -8px;
    width: 1px;
    margin-left: -0.5px;
    background-image: repeating-linear-gradient(
        to bottom,
        #ec4899 0,
        #ec4899 5px,
        transparent 5px,
        transparent 9px
    );
}

.visaro-print-snap-y {
    left: -8px;
    right: -8px;
    height: 1px;
    margin-top: -0.5px;
    background-image: repeating-linear-gradient(
        to right,
        #ec4899 0,
        #ec4899 5px,
        transparent 5px,
        transparent 9px
    );
}

@media (max-width: 991px) {
    body.visaro-print-product #main-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.visaro-print-product.woocommerce div.product div.visaro-print-gallery,
    body.visaro-print-product.woocommerce div.product div.summary {
        width: 50%;
        max-width: 50%;
        float: none;
        margin-top: 0;
    }

    body.visaro-print-product.woocommerce div.product div.summary {
        padding-left: 20px;
    }
}

@media (max-width: 760px) {
    body.visaro-print-product #main-content {
        padding-left: 12px;
        padding-right: 12px;
    }

    body.visaro-print-product.woocommerce div.product div.summary {
        padding-left: 12px;
    }

    body.visaro-print-product.woocommerce div.product div.summary .product_title {
        font-size: 1.6rem;
    }
}

/* Shop print products only (customer types on the Woo product page).
   Do not apply to /visarodesign/. */
@media (max-width: 767px) {
    body.single-product.visaro-print-product.woocommerce div.product .product-images-summary {
        flex-wrap: wrap;
        flex-direction: column;
    }

    body.single-product.visaro-print-product.woocommerce div.product div.visaro-print-gallery,
    body.single-product.visaro-print-product.woocommerce div.product div.summary {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    body.single-product.visaro-print-product.woocommerce div.product div.visaro-print-gallery {
        order: 1;
        position: relative;
        margin: 0 0 10px;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }

    body.single-product.visaro-print-product .visaro-print-thumbs {
        order: 0;
        flex: 0 0 44px;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: stretch;
        width: 44px;
        margin: 0;
        gap: 6px;
    }

    body.single-product.visaro-print-product .visaro-print-thumb {
        width: 44px;
        height: 44px;
        border-radius: 6px;
        flex: 0 0 44px;
    }

    body.single-product.visaro-print-product .visaro-print-thumb-label {
        font-size: 8px;
        padding: 1px 0;
    }

    body.single-product.visaro-print-product.woocommerce div.product div.summary {
        display: contents;
    }

    body.single-product.visaro-print-product .visaro-print-summary-fields {
        display: contents;
    }

    body.single-product.visaro-print-product.woocommerce div.product div.summary > * {
        order: 30;
    }

    body.single-product.visaro-print-product.woocommerce div.product div.summary > .detail-meta-top,
    body.single-product.visaro-print-product.woocommerce div.product div.summary > .meta-content,
    body.single-product.visaro-print-product.woocommerce div.product div.summary > .single-counter-wrapper,
    body.single-product.visaro-print-product.woocommerce div.product div.summary > .ts-variation-price {
        order: 30;
    }

    body.single-product.visaro-print-product.woocommerce div.product div.summary > .meta-content {
        margin-top: 8px;
        padding-top: 0;
        border: 0;
    }

    body.single-product.visaro-print-product .visaro-print-editor-tools {
        order: 2;
        width: 100%;
    }

    body.single-product.visaro-print-product.woocommerce div.product div.summary > .product_title {
        order: 3;
        width: 100%;
        margin: 18px 0 4px;
        font-size: 1.45rem;
    }

    body.single-product.visaro-print-product.woocommerce div.product div.summary > .price {
        order: 4;
        width: 100%;
        margin: 0 0 14px;
    }

    body.single-product.visaro-print-product .visaro-print-cart {
        order: 5;
        width: 100%;
        margin-top: 0;
    }

    body.single-product.visaro-print-product .visaro-print-finish-note,
    body.single-product.visaro-print-product .visaro-print-product-description {
        display: none;
    }

    body.single-product.visaro-print-product .visaro-print-canvas {
        order: 1;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        width: auto;
        max-width: none;
        margin: 0;
    }

    body.single-product.visaro-print-product .visaro-print-photo {
        width: auto !important;
        max-width: 100%;
        height: auto !important;
        max-height: min(48svh, 380px);
        object-fit: contain;
        object-position: center;
        margin: 0 auto;
    }

    body.single-product.visaro-print-product .visaro-print-hint {
        display: none;
    }

    body.single-product.visaro-print-product .visaro-print-field {
        margin: 0 0 10px;
    }

    body.single-product.visaro-print-product .visaro-print-field > label {
        margin-bottom: 6px;
    }

    body.single-product.visaro-print-product .visaro-print-text-list {
        gap: 8px;
        margin-bottom: 8px;
    }

    body.single-product.visaro-print-product .visaro-print-text-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(110px, 1.1fr);
        gap: 8px 10px;
        padding: 10px 36px 10px 10px;
    }

    body.single-product.visaro-print-product .visaro-print-text-row.is-layout-locked {
        display: block;
        padding: 0;
        border: 0;
        background: transparent;
    }

    body.single-product.visaro-print-product .visaro-print-text-input {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        min-height: 44px;
        font-size: 16px;
    }

    body.single-product.visaro-print-product textarea.visaro-print-text-input,
    body.single-product.visaro-print-product .visaro-print-text-input.is-multiline {
        min-height: 110px;
        font-size: 16px;
    }

    body.single-product.visaro-print-product .visaro-print-font-select,
    body.single-product.visaro-print-product .visaro-print-font-picker {
        grid-column: 1 / -1;
        grid-row: 2;
        min-height: 42px;
        font-size: 16px;
    }

    body.single-product.visaro-print-product .visaro-print-size-label {
        grid-column: 1 / -1;
        grid-row: 3;
        max-width: none;
    }

    body.single-product.visaro-print-product .visaro-print-size-caption {
        display: none;
    }

    body.single-product.visaro-print-product .visaro-print-size-number {
        min-height: 42px;
        min-width: 4.25rem;
        width: 4.75em;
        flex-basis: 4.75em;
        font-size: 16px;
        padding: 6px 10px;
    }

    body.single-product.visaro-print-product .visaro-print-color-swatches {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    body.single-product.visaro-print-product .visaro-print-scene-select {
        min-height: 44px;
        font-size: 16px;
    }

    body.single-product.visaro-print-product .visaro-print-upload-row {
        padding: 10px;
        gap: 8px;
    }

    body.single-product.visaro-print-product .visaro-print-dropzone {
        padding: 10px 12px;
        border-radius: 10px;
    }

    body.single-product.visaro-print-product #visaro-print-upload-section .description {
        margin: 6px 0 8px;
    }

    body.single-product.visaro-print-product .visaro-print-admin-layout {
        order: 40;
        width: 100%;
        margin-top: 18px;
    }

    body.single-product.visaro-print-product.visaro-print-field-focus .visaro-print-gallery {
        justify-content: center;
        gap: 0;
        margin-bottom: 8px;
        scroll-margin-top: 0;
    }

    body.single-product.visaro-print-product.visaro-print-field-focus .visaro-print-canvas {
        width: 100%;
        max-width: none;
        margin: 0 auto;
    }

    body.single-product.visaro-print-product.visaro-print-field-focus .visaro-print-photo {
        max-height: var(--visaro-focus-photo-max, 42dvh) !important;
    }

    /* Keep title, price, stjernetegn and add-to-cart visible. iOS often
       dismisses the keyboard without blurring the field, so hiding those
       controls made the page look empty. */
    body.single-product.visaro-print-product.visaro-print-field-focus .visaro-print-admin-layout {
        display: none !important;
    }

    body.single-product.visaro-print-product.visaro-print-typing-dock-open .visaro-print-gallery {
        position: sticky;
        top: 0;
        z-index: 30;
        margin-bottom: 8px;
        background: #fff;
        justify-content: center;
        gap: 0;
    }

    body.single-product.visaro-print-product.visaro-print-typing-dock-open .visaro-print-thumbs,
    body.single-product.visaro-print-product.visaro-print-typing-dock-open .visaro-print-editor-tools,
    body.single-product.visaro-print-product.visaro-print-typing-dock-open .visaro-print-admin-layout {
        display: none !important;
    }

    body.single-product.visaro-print-product.visaro-print-typing-dock-open .visaro-print-photo {
        max-height: min(38svh, 280px) !important;
    }

    body.single-product.visaro-print-product.visaro-print-typing-dock-open.woocommerce div.product div.summary > .product_title,
    body.single-product.visaro-print-product.visaro-print-typing-dock-open.woocommerce div.product div.summary > .price,
    body.single-product.visaro-print-product.visaro-print-typing-dock-open .visaro-print-cart {
        opacity: 0.28;
        pointer-events: none;
    }
}

.visaro-print-finish-note {
    font-size: 13px;
    color: #4b5563;
    margin: 0 0 14px;
    line-height: 1.4;
}

.visaro-print-product-description {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px;
}

.visaro-print-misconfigured {
    padding: 40px;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    color: #6b7280;
}

.visaro-print-preview-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.visaro-print-canvas {
    position: relative;
    display: block;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    line-height: 0;
    overflow: visible;
    border-radius: 8px;
}

.visaro-print-photo {
    display: block;
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    border-radius: 8px;
    user-select: none;
    pointer-events: none;
}

.visaro-print-blend {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: none;
}

.visaro-print-area {
    position: absolute;
    border: 0;
    background: transparent;
    box-sizing: border-box;
    overflow: hidden;
    pointer-events: none;
}

.visaro-print-objects {
    position: absolute;
    inset: 0;
    pointer-events: auto;
}

.visaro-print-object {
    position: absolute;
    cursor: move;
    touch-action: none;
    user-select: none;
    white-space: nowrap;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0;
    transform: none;
    padding: 0;
}

.visaro-print-text-object {
    display: block;
    overflow: hidden;
    box-sizing: content-box;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 0;
}

.visaro-print-text-object canvas {
    display: block;
    /* Keep intrinsic canvas size from JS — do not squash padded glow ink. */
    width: auto;
    height: auto;
    max-width: none;
    pointer-events: none;
}

.visaro-print-edit-in-designer {
    margin: 16px 0 0;
}

.visaro-print-edit-in-designer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.visaro-product-group-label {
    margin: 16px 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

a.visaro-option-card {
    text-decoration: none;
    color: inherit;
}

/*
 * Multiply on the glyph itself (not a full-size overlay + isolation).
 * isolation:isolate on the canvas made the blend group flatten to a
 * solid overlay after a later paint/reload, so the burned-in look vanished.
 */
.visaro-print-gallery.is-engraving .visaro-print-text-object,
.visaro-print-gallery.is-engraving .visaro-print-object.is-engraved,
.visaro-print-text-object.is-engraved,
.visaro-print-gallery.is-led-glow .visaro-print-text-object.is-engraved {
    color: #1c130a !important;
    opacity: 0.72;
    mix-blend-mode: multiply;
    filter: none;
    text-shadow: none;
}

.visaro-print-gallery.is-engraving .visaro-print-upload-object.is-engraved,
.visaro-print-gallery.is-led-glow .visaro-print-upload-object.is-engraved {
    mix-blend-mode: multiply;
    opacity: 0.62;
    filter: none;
}

/* LED acrylic glow — bloom is painted on canvas; do not clip it to the print box. */
.visaro-print-gallery.is-led-glow .visaro-print-area[data-finish="led-glow"],
.visaro-print-gallery.is-led-glow .visaro-print-area[data-finish="led-glow"] .visaro-print-objects,
.visaro-print-area[data-finish="led-glow"] {
    overflow: visible;
}

.visaro-print-gallery.is-led-glow .visaro-print-area[data-finish="gravering"],
.visaro-print-gallery.is-led-glow .visaro-print-area[data-finish="gravering"] .visaro-print-objects {
    overflow: hidden;
}

.visaro-print-gallery.is-led-glow .visaro-print-text-object:not(.is-engraved),
.visaro-print-gallery.is-led-glow .visaro-print-text-object.is-led-glow:not(.is-engraved) {
    overflow: visible;
    color: var(--visaro-glow-color, #ffe6a8);
    opacity: 1;
    mix-blend-mode: screen;
    filter: none;
    text-shadow: none;
}

.visaro-print-gallery.is-led-glow .visaro-print-text-object canvas {
    overflow: visible;
    filter: none;
}

.visaro-print-scene-select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #161616;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.visaro-print-scene-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.visaro-print-scene-chip {
    appearance: none;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #161616;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.visaro-print-scene-chip:hover {
    border-color: #9ca3af;
}

.visaro-print-scene-chip.is-selected {
    border-color: #161616;
    background: #161616;
    color: #fff;
}

.visaro-print-text-object.is-layout-locked {
    cursor: default;
    pointer-events: none;
}

.visaro-print-text-row.is-layout-locked .visaro-print-text-input {
    width: 100%;
    max-width: 100%;
}

.visaro-print-finish-note {
    font-size: 13px;
    color: #4b5563;
    margin: 0 0 12px;
    line-height: 1.45;
}

/* Admin-only layout editor on the full product photo */
.visaro-print-admin-layout {
    margin: 20px 0 0;
    padding: 14px;
    border: 1px dashed #0f7490;
    border-radius: 10px;
    background: #f0f9fb;
}

.visaro-print-admin-layout-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #0f7490;
}

.visaro-print-admin-layout-help {
    margin: 0 0 10px;
    font-size: 12px;
    color: #4b5563;
    line-height: 1.4;
}

.visaro-print-admin-layout-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.visaro-print-admin-vis-skjul {
    margin: 10px 0 0 !important;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px !important;
    border: 1px solid #0f7490 !important;
    background: #fff !important;
    color: #0f7490 !important;
    font-weight: 700 !important;
}

.visaro-print-admin-vis-skjul.is-hidden-state {
    background: #0f7490 !important;
    color: #fff !important;
}

.visaro-print-admin-layout-controls {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.visaro-print-admin-layout-controls label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

.visaro-print-admin-glow-toggle {
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
    cursor: pointer;
}

.visaro-print-admin-layout-controls input[type="number"] {
    max-width: 140px;
}

.visaro-print-admin-quicksnap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0 0;
    padding: 10px;
    border: 1px solid #9bd3e0;
    border-radius: 8px;
    background: #fff;
}

.visaro-print-admin-quicksnap-label {
    font-size: 12px;
    font-weight: 700;
    color: #0f7490;
}

.visaro-print-admin-quicksnap-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.visaro-print-quicksnap-btn,
.visaro-print-admin-quicksnap-btns .button {
    flex: 1 1 0;
    min-width: 72px;
    margin: 0 !important;
    padding: 8px 10px !important;
    border: 1px solid #0f7490 !important;
    background: #0f7490 !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    cursor: pointer;
}

.visaro-print-quicksnap-btn:hover,
.visaro-print-admin-quicksnap-btns .button:hover {
    background: #0c5d73 !important;
    border-color: #0c5d73 !important;
    color: #fff !important;
}

.visaro-print-admin-layout-mm,
.visaro-print-admin-layout-status {
    margin: 0;
    font-size: 13px;
    color: #475569;
}

.visaro-print-admin-area-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: flex-end;
    margin: 4px 0 8px;
}

.visaro-print-admin-area-tools label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

.visaro-print-admin-area-tools input[type="text"],
.visaro-print-admin-area-tools select {
    min-width: 140px;
    font-weight: 400;
}

.visaro-print-field-label {
    display: block;
    width: 100%;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin: 0 0 4px;
}

.visaro-print-area-price-hint {
    display: block;
    margin: -2px 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: #0f766e;
}

.visaro-print-live-price {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.visaro-print-extra-price {
    display: inline-block;
    margin-left: 6px;
    font-weight: 600;
    color: #0f766e;
    white-space: nowrap;
}

.visaro-print-admin-layout > .visaro-print-admin-layout-status {
    display: block;
    margin: 8px 0 0;
    color: #0f7490;
    font-weight: 600;
}

.visaro-print-admin-layout-status--save {
    display: block;
    margin: 10px 0 4px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
}

.visaro-print-admin-layout-status--save[hidden] {
    display: none !important;
}

.visaro-print-admin-layout-status.is-busy,
.visaro-print-admin-layout-status--save.is-busy {
    color: #334155;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.visaro-print-admin-layout-status.is-ok,
.visaro-print-admin-layout-status--save.is-ok {
    color: #065f46;
    background: #ecfdf5;
    border-color: #6ee7b7;
}

.visaro-print-admin-layout-status.is-error,
.visaro-print-admin-layout-status--save.is-error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fca5a5;
}

.visaro-print-admin-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
}

.visaro-print-admin-area-boxes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.visaro-print-admin-scale-draw {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: auto;
    cursor: crosshair;
    background: rgba(15, 116, 144, 0.06);
}

.visaro-print-admin-scale-draw[hidden] {
    display: none !important;
}

#visaro-print-admin-redraw-scale.is-active {
    background: #0f7490;
    border-color: #0f7490;
    color: #fff;
}

.visaro-print-admin-scale-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.visaro-print-admin-scale-stroke {
    stroke: #0f7490;
    stroke-width: 1.6;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.visaro-print-admin-scale-handle {
    position: absolute;
    z-index: 5;
    width: 18px;
    height: 18px;
    margin-left: -9px;
    margin-top: -9px;
    background: #0f7490;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: grab;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
    touch-action: none;
}

.visaro-print-admin-scale-mid {
    position: absolute;
    z-index: 4;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    margin-top: -5px;
    background: #fff;
    border: 2px solid #0f7490;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(15, 116, 144, 0.25);
}

.visaro-print-admin-snap-guide {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    background: rgba(15, 116, 144, 0.85);
}

.visaro-print-admin-snap-guide[hidden] {
    display: none !important;
}

.visaro-print-admin-snap-guide--x {
    top: 0;
    bottom: 0;
    width: 1px;
    margin-left: -0.5px;
}

.visaro-print-admin-snap-guide--y {
    left: 0;
    right: 0;
    height: 1px;
    margin-top: -0.5px;
}

.visaro-print-admin-scale-caption {
    position: absolute;
    z-index: 5;
    transform: translate(-50%, -130%);
    pointer-events: none;
    background: #0f7490;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.visaro-print-admin-area-box {
    position: absolute;
    z-index: 4;
    box-sizing: border-box;
    border: 2px solid #e11d8f;
    background: rgba(225, 29, 143, 0.12);
    pointer-events: auto;
    cursor: pointer;
    touch-action: none;
}

.visaro-print-admin-area-box.is-selected {
    z-index: 6;
    border-color: #e11d8f;
    box-shadow: 0 0 0 2px rgba(225, 29, 143, 0.4);
}

.visaro-print-admin-area-box:not(.is-selected) {
    border-color: rgba(225, 29, 143, 0.45);
    background: rgba(225, 29, 143, 0.06);
}

.visaro-print-admin-area-edge {
    position: absolute;
    z-index: 5;
    pointer-events: auto;
    cursor: move;
    touch-action: none;
}

.visaro-print-admin-area-edge[data-edge="t"] {
    left: 0;
    right: 0;
    top: -10px;
    height: 18px;
}

.visaro-print-admin-area-edge[data-edge="b"] {
    left: 0;
    right: 0;
    bottom: -10px;
    height: 18px;
}

.visaro-print-admin-area-edge[data-edge="l"] {
    top: 0;
    bottom: 0;
    left: -10px;
    width: 18px;
}

.visaro-print-admin-area-edge[data-edge="r"] {
    top: 0;
    bottom: 0;
    right: -10px;
    width: 18px;
}

.visaro-print-admin-area-label {
    position: absolute;
    left: 6px;
    top: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: rgba(225, 29, 143, 0.9);
    padding: 1px 5px;
    border-radius: 3px;
    pointer-events: none;
}

.visaro-print-admin-area-handle {
    position: absolute;
    z-index: 6;
    right: -7px;
    bottom: -7px;
    width: 14px;
    height: 14px;
    background: #e11d8f;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: nwse-resize;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
    touch-action: none;
}

body.visaro-admin-print-layout-edit .visaro-print-admin-overlay {
    z-index: 40;
}

body.visaro-admin-print-layout-edit .visaro-print-blend {
    z-index: 25;
    pointer-events: none;
}

body.visaro-admin-print-layout-edit .visaro-print-objects {
    pointer-events: none;
}

body.visaro-admin-print-layout-edit .visaro-print-text-object,
body.visaro-admin-print-layout-edit .visaro-print-upload-object {
    pointer-events: auto;
    cursor: move;
}

body.visaro-admin-print-layout-edit .visaro-print-area {
    overflow: visible;
}

body.visaro-admin-scale-draw-mode .visaro-print-admin-overlay {
    z-index: 50;
}

body.visaro-admin-scale-draw-mode .visaro-print-objects {
    pointer-events: none !important;
}

.visaro-print-upload-object {
    height: auto;
    max-width: none;
    border-radius: 2px;
}

/* ---- Sidebar controls ---- */

.visaro-print-text-list,
.visaro-print-uploads-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.visaro-print-text-row,
.visaro-print-upload-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.visaro-print-text-row .visaro-print-remove-btn {
    align-self: flex-end;
    position: absolute;
}

.visaro-print-text-row {
    position: relative;
    padding-right: 36px;
}

.visaro-print-font-select {
    width: 100%;
    min-height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 6px 10px;
    background: #fff;
}

.visaro-print-font-picker {
    position: relative;
    width: 100%;
    flex: 1 1 100%;
}

.visaro-print-font-picker .visaro-font-picker-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

.visaro-print-font-picker .visaro-font-picker-btn {
    display: block;
    width: 100%;
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    text-align: left;
    font-size: 16px;
    line-height: 1.3;
    color: #111827;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visaro-print-font-picker.is-open .visaro-font-picker-btn {
    border-color: #111827;
    box-shadow: 0 0 0 1px #111827;
}

.visaro-print-font-picker .visaro-font-picker-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 50;
    max-height: min(45vh, 260px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

.visaro-print-font-picker .visaro-font-picker-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    font-size: 18px;
    line-height: 1.35;
    color: #111827;
    cursor: pointer;
}

.visaro-print-font-picker .visaro-font-picker-option.is-selected,
.visaro-print-font-picker .visaro-font-picker-option:active {
    background: #f3f4f6;
}

.visaro-print-text-input {
    flex: 1 1 100%;
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

textarea.visaro-print-text-input,
.visaro-print-text-input.is-multiline {
    min-height: 96px;
    width: 100%;
    resize: vertical;
    line-height: 1.4;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
}

.visaro-print-color-swatches {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.visaro-print-color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
}

.visaro-print-color-swatch.is-active {
    border-color: #111827;
}

.visaro-print-size-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    flex: 1 1 auto;
}

.visaro-print-size-caption {
    flex: 0 0 auto;
}

.visaro-print-size-range {
    flex: 1 1 auto;
    min-width: 0;
}

.visaro-print-size-number {
    box-sizing: border-box;
    width: 4.5em;
    flex: 0 0 4.5em;
    min-width: 3.75rem;
    min-height: 32px;
    margin: 0;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    -moz-appearance: textfield;
}

.visaro-print-size-number::-webkit-outer-spin-button,
.visaro-print-size-number::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.visaro-print-add-line:disabled {
    opacity: 0.4;
    cursor: default;
    text-decoration: none;
}

.visaro-print-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
}

.visaro-print-remove-btn:hover {
    color: #ef4444;
}

.visaro-print-add-btn {
    width: 100%;
}

.visaro-print-upload-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.visaro-print-upload-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #6b7280;
    background: #eef2f7;
    border-radius: 4px;
}

.visaro-print-upload-row.visaro-is-uploading {
    color: #6b7280;
    font-size: 13px;
}

#visaro-print-upload-section .description {
    font-size: 12px;
    color: #9ca3af;
    margin: 8px 0 12px;
}

.visaro-print-upload-heading {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.visaro-print-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.visaro-print-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.visaro-print-dropzone:hover,
.visaro-print-dropzone:focus-visible {
    border-color: #111827;
    background: #fafafa;
    outline: none;
}

.visaro-print-dropzone.is-dragover {
    border-color: #111827;
    border-style: solid;
    background: #f4f4f5;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

.visaro-print-dropzone-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #111827;
    color: #fff;
}

.visaro-print-dropzone-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.visaro-print-dropzone-copy strong {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.visaro-print-dropzone-copy span {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* Print-layout inside Visaro Designer — same canvas/overlay as shop SKU. */
body.visaro-designer-print-mode .visaro-configurator-preview-wrap.is-print-product {
    overflow: auto;
    align-items: flex-start;
    justify-content: center;
    display: flex;
    flex-direction: column;
}

body.visaro-designer-print-mode .visaro-print-gallery.images {
    float: none;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

body.visaro-designer-print-mode .visaro-print-canvas {
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
}

body.visaro-designer-print-mode .visaro-print-summary-fields {
    width: 100%;
}

body.visaro-designer-print-mode .visaro-option-list[data-step-panel="layout"].is-active {
    display: block;
}

body.visaro-designer-print-mode .visaro-print-cart {
    margin-top: 16px;
}

@media (max-width: 1100px), (max-width: 1300px) and (max-height: 740px) {
    body.visaro-designer-print-mode .visaro-configurator-shell.is-print-product {
        padding-bottom: 140px;
    }

    body.visaro-designer-print-mode .visaro-configurator-preview-wrap.is-print-product {
        min-height: calc(100svh - 248px);
        padding: 12px 12px 20px;
        width: 100%;
    }

    body.visaro-designer-print-mode .visaro-print-gallery.images {
        max-width: 100%;
    }

    body.visaro-designer-print-mode .visaro-print-designer-actionbar {
        align-items: center;
    }

    body.visaro-designer-print-mode .visaro-print-designer-actionbar .visaro-print-cart {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        gap: 8px;
        margin: 0;
        width: auto;
    }

    body.visaro-designer-print-mode .visaro-print-designer-actionbar .visaro-print-cart .quantity {
        margin: 0;
    }

    body.visaro-designer-print-mode .visaro-print-designer-actionbar .single_add_to_cart_button {
        flex: 1 1 auto;
        margin: 0;
        float: none;
        min-height: 44px;
    }

    body.visaro-designer-print-mode .visaro-print-text-input {
        font-size: 16px;
    }

    body.visaro-designer-print-mode.visaro-print-field-focus .visaro-configurator-preview-panel {
        position: fixed;
        top: var(--visaro-vv-top, 0px);
        left: 0;
        right: 0;
        z-index: 20;
        width: 100%;
        height: var(--visaro-vv-preview-h, 42dvh);
        min-height: 0;
        padding: 0;
        background: #f4f8fa;
    }

    body.visaro-designer-print-mode.visaro-print-field-focus .visaro-configurator-preview-wrap.is-print-product {
        min-height: 0;
        height: 100%;
        padding: 8px 10px;
        overflow: hidden;
        align-items: center;
    }

    body.visaro-designer-print-mode.visaro-print-field-focus .visaro-print-gallery.images {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    body.visaro-designer-print-mode.visaro-print-field-focus .visaro-print-canvas,
    body.visaro-designer-print-mode.visaro-print-field-focus .visaro-print-photo {
        max-height: 100% !important;
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    body.visaro-designer-print-mode.visaro-print-field-focus .visaro-print-thumbs,
    body.visaro-designer-print-mode.visaro-print-field-focus .visaro-print-admin-layout,
    body.visaro-designer-print-mode.visaro-print-field-focus .visaro-print-designer-actionbar,
    body.visaro-designer-print-mode.visaro-print-field-focus .visaro-configurator-sidebar {
        display: none !important;
    }

    body.visaro-designer-print-mode.visaro-print-field-focus .visaro-step-detail {
        position: fixed;
        z-index: 55;
        left: 0;
        right: 0;
        bottom: auto;
        top: var(--visaro-vv-sheet-top, 42dvh);
        height: var(--visaro-vv-sheet-h, 38dvh);
        max-height: var(--visaro-vv-sheet-h, 38dvh);
        border-radius: 12px 12px 0 0;
    }

    body.visaro-designer-print-mode.visaro-print-field-focus .visaro-configurator-shell.is-print-product {
        padding-bottom: 0;
    }

    body.visaro-designer-print-mode.visaro-print-field-focus .visaro-configurator-shell.is-detail-collapsed .visaro-step-detail {
        display: flex;
    }

    body.visaro-designer-print-mode.visaro-print-typing-dock-open .visaro-configurator-preview-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 20;
        width: 100%;
        height: 42svh;
        min-height: 0;
        padding: 0;
        background: #f4f8fa;
    }

    body.visaro-designer-print-mode.visaro-print-typing-dock-open .visaro-configurator-preview-wrap.is-print-product {
        min-height: 0;
        height: 100%;
        padding: 8px 10px;
        overflow: hidden;
        align-items: center;
    }

    body.visaro-designer-print-mode.visaro-print-typing-dock-open .visaro-print-gallery.images {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    body.visaro-designer-print-mode.visaro-print-typing-dock-open .visaro-print-canvas,
    body.visaro-designer-print-mode.visaro-print-typing-dock-open .visaro-print-photo {
        max-height: 100% !important;
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    body.visaro-designer-print-mode.visaro-print-typing-dock-open .visaro-print-thumbs,
    body.visaro-designer-print-mode.visaro-print-typing-dock-open .visaro-print-admin-layout,
    body.visaro-designer-print-mode.visaro-print-typing-dock-open .visaro-print-designer-actionbar,
    body.visaro-designer-print-mode.visaro-print-typing-dock-open .visaro-configurator-sidebar,
    body.visaro-designer-print-mode.visaro-print-typing-dock-open .visaro-step-detail {
        display: none !important;
    }

    body.visaro-size-peek .visaro-step-detail {
        background: rgba(255, 255, 255, 0.12) !important;
        box-shadow: none !important;
        border-color: transparent !important;
    }

    body.visaro-size-peek .visaro-step-detail-header,
    body.visaro-size-peek .visaro-step-detail-body > *:not(:has(.visaro-print-size-range)) {
        opacity: 0.08;
        pointer-events: none;
    }

    body.visaro-size-peek .visaro-print-size-label {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    body.visaro-size-peek .visaro-print-designer-actionbar,
    body.visaro-size-peek .visaro-configurator-sidebar {
        opacity: 0.12;
        pointer-events: none;
    }
}

.visaro-print-typing-dock {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
}

body.visaro-print-typing-dock-open .visaro-print-typing-dock {
    display: block;
}

.visaro-print-dock-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.18);
    border: 0;
    padding: 0;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.visaro-print-dock-card {
    position: absolute;
    left: 50%;
    right: auto;
    width: min(260px, calc(100vw - 48px));
    transform: translateX(-50%);
    top: var(--visaro-dock-top, 42svh);
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
    pointer-events: auto;
}

.visaro-print-dock-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.visaro-print-dock-card label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.visaro-print-dock-done {
    flex: 0 0 auto;
    margin: 0;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

#visaro-print-dock-input {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.3;
    box-sizing: border-box;
    resize: none;
    background: #fff;
    color: #0f172a;
}

#visaro-print-dock-input.is-multiline {
    min-height: 110px;
}

#visaro-print-dock-input:focus {
    outline: 2px solid rgba(15, 23, 42, 0.25);
    outline-offset: 1px;
    border-color: #64748b;
}

