/* Photowall Configurator Styles */

/* ============================================
   MODE SELECTOR TABS
   ============================================ */

.photowall-dimensions-selector {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    background-color: #fff;
}

.photowall-dimensions-selector button {
    flex: 1;
    height: 48px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    cursor: pointer;
    border: 1px solid #F4F4F4;
    background: #FFFFFF;
    border-radius: 0;
    color: #000;
    text-transform: lowercase;
    transition: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.photowall-dimensions-selector button:hover, .photowall-dimensions-selector button:active, .photowall-dimensions-selector button:focus {
    background-color: #F6F6F6 !important;
}

.photowall-dimensions-selector button:hover:after {
    content: none !important;
}

.photowall-dimensions-selector button:after {
    content: none !important;
}

.photowall-dimensions-selector button:first-letter {
    text-transform: uppercase;
}

.photowall-dimensions-selector button.active {
    font-weight: 700;
    background-color: #F7F7F7;
    color: #000;
    border: 1px solid #5D5D5D;
    position: relative;
}


/*.photowall-dimensions-selector button.active:before {*/
/*    content: "";*/
/*    background-color: #F6F6F6;*/
/*    position: absolute;*/
/*    width: 100%;*/
/*    left: 0;*/
/*    top: 100%;*/
/*    height: 2px;*/
/*    opacity: 1;*/
/*}*/


/* Mode content areas */
[data-type="size-select"],
[data-type="size-creator"] {
    display: none;
}

[data-type="size-select"].active,
[data-type="size-creator"].active {
    display: block;
    border: 1px solid #5D5D5D;
    padding: 15px;
    margin-top: 10px;
    background-color: #F6F6F6;
}

/* ============================================
   SIZE SELECT DROPDOWN
   ============================================ */

.photowall-size-select-wrapper {
    margin-bottom: 15px;
    flex-basis: 100%;
    flex-grow: 1;
    flex-shrink: 1;
}

.photowall-tooltip-info > span {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    margin: 10px 0 15px;
}

.photowall-label-option > span {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    margin: 10px 0 15px;
}

.photowall-tooltip-info > span::after {
    content: "i";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    color: #fff;
    font-size: 10px;
    font-style: italic;
    font-weight: 600;
    font-family: Georgia, serif;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    margin-left: 8px;
    vertical-align: middle;
}

.photowall-check-button-selected {
    border-color: #222222 !important;
}

.photowall-check-button-disabled,
.photowall-check-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

body .photowall-option-select-normal .size-text {
    margin-left: 0 !important;
    font-weight: 400;
    font-size: 12px;
}

body .photowall-option-select-normal .photowall-size-select-current {
    height: 48px !important;
}

body .photowall-fieldset-group:last-child {
    margin-bottom: 0;
}

.photowall-size-select {
    position: relative;
    width: 100%;
}

.photowall-size-select-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #DBDBDB;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.photowall-size-select-current:hover {
    border-color: #999;
}

.photowall-size-select.open .photowall-size-select-current {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.photowall-size-select-current .size-text {
    font-weight: 600;
    font-size: 14px;
    color: #000;
    margin-left: 16px;
}

.photowall-size-select-current .size-text-info {
    font-weight: 400;
    font-size: 14px;
    color: #000;
}

.photowall-check-button {
    display: block;
    height: 48px;
    text-align: center;
    border: 1px solid #DBDBDB;
    background: #fff;
    cursor: pointer;
    user-select: none;
    flex-basis: 100%;
    flex-shrink: 1;
    flex-grow: 1;
    font-size: 12px;
    font-weight: 400;
    line-height: 48px;
}

.photowall-fieldset-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
}

.photowall-size-select-current .size-price {
    font-size: 14px;
    color: #000;
    margin-left: auto;
    margin-right: 18px;
}

.photowall-size-select-current .size-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    color: #000;
}

.photowall-size-select.open .photowall-size-select-current .size-arrow {
    transform: rotate(180deg);
}

.photowall-size-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #DBDBDB;
    border-top: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.photowall-size-select.open .photowall-size-select-dropdown {
    display: block;
}

.photowall-size-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.15s;
    border-bottom: 1px solid #f0f0f0;
}

.photowall-size-option:last-child {
    border-bottom: none;
}

.photowall-size-option:hover {
    background-color: #f5f5f5;
}

.photowall-size-option.selected {
    background-color: #ececec;
    cursor: default;
}

.photowall-size-option .size-text {
    font-weight: 500;
    font-size: 14px;
    color: #000;
}

.photowall-size-option .size-text-info {
    font-weight: 400;
    font-size: 14px;
    color: #000;
}

.photowall-size-option .size-price {
    font-size: 14px;
    color: #000;
    margin-left: auto;
}

.photowall-size-option .size-price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
    margin-left: auto;
    margin-right: 0;
}

.photowall-size-option .size-price-special {
    color: #e02b27;
    font-weight: 600;
    margin-left: 8px;
}

.photowall-size-option .size-check {
    display: none;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding-left: 10px;
    color: #28a745;
}

.photowall-size-option.selected .size-check {
    display: flex;
}

/* Option select styles (reuse size-select styles) */
.photowall-option-select {
    position: relative;
    width: 100%;
}

.photowall-option-select .photowall-size-select-current,
.photowall-option-select .photowall-size-select-dropdown,
.photowall-option-select .photowall-size-option {
    /* Inherit from .photowall-size-select styles */
}

.photowall-option-select.open .photowall-size-select-current {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.photowall-option-select.open .photowall-size-select-current .size-arrow {
    transform: rotate(180deg);
}

.photowall-option-select.open .photowall-size-select-dropdown {
    display: block;
}

/* ============================================
   DIMENSION INPUTS
   ============================================ */

/* Dimension inputs */
.photowall-dimensions {
    margin-bottom: 20px;
}

.photowall-dimensions > .label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
}

.photowall-dimensions .label:first-child {
    margin-bottom: 10px;
    display: block;
}

.photowall-dimensions .label:first-child > span {
    font-weight: 700;
}

.photowall-dimensions > .label > i {
    color: #ADADAD;
    font-size: 14px;
    font-weight: 400;
}

.photowall-dimensions > .label > i > b {
    color: #000;
    font-size: 14px;
    font-weight: 600;
}

.photowall-dimensions-inputs {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-direction: row;
    gap: 27px;
    margin-bottom: 15px;
}

.photowall-dimensions-input-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    border: 1px solid #DBDBDB;
    height: 48px;
    position: relative;
}

.photowall-dimensions-input-wrapper > svg {
    height: 48px;
    width: 48px;
    display: block;
    flex-shrink: 0;
}


body #product_addtocart_form:has(#photowall-configurator) #product-options-wrapper {
    display: none;
}

.photowall-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-basis: 50%;
}

.photowall-input-label {
    font-size: 12px;
    color: #666;
}

.photowall-dimension-input {
    width: 100% !important;
    text-align: center;
    padding: 8px 10px;
    font-size: 14px;
    height: 100% !important;
    border: 1px solid transparent !important;
    color: transparent;
    caret-color: #000;
}

.photowall-dimension-input:focus {
    color: #000;
    border-color: #3399ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(51, 153, 255, 0.2);
}

.photowall-dimension-input:focus + .photowall-input-display {
    display: none;
}

.photowall-input-display {
    position: absolute;
    top: 0;
    left: 48px;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 400;
    color: #000;
    pointer-events: none;
}

/* Confirm custom size button (redirect to W_ product) */
.photowall-confirm-size {
    width: 100%;
    margin-top: 15px;
    height: 48px;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
}

/* Validation error state */
.photowall-dimension-input.input-error {
    border-color: #e02b27 !important;
    border-width: 2px !important;
}

.photowall-input-error {
    display: none;
    font-size: 12px;
    color: #e02b27;
    margin-top: 4px;
    line-height: 1.3;
}

/* Disabled input state (when height is blocked) */
.photowall-dimension-input.input-disabled,
.photowall-dimension-input:disabled {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

.photowall-dimensions.height-locked .photowall-input-group:last-child {
    opacity: 0.6;
}

.photowall-dimension-separator {
    font-weight: bold;
    color: #333;
    font-size: 16px;
    padding-top: 20px;
}

.photowall-dimension-unit {
    color: #666;
    font-size: 14px;
    padding-top: 20px;
}

/* Cropper.js overrides - HIDE crop box border and handles */
.fotorama__stage .cropper-container {
    z-index: 10;
}

/* Hide the crop box outline/border */
.cropper-view-box {
    outline: none !important;
    box-shadow: none !important;
}

/* Show crop lines (edges) for dragging.
 * pointer-events default to NONE so the user cannot resize via mouse unless a
 * mask is active (see body.photowall-mask-resize-active rules below).
 * The mask-aware cropper inits with cropBoxResizable=true so handles exist in
 * the DOM, but interaction is gated by CSS. */
.cropper-line {
    background-color: rgba(255, 255, 255, 0) !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

.cropper-line-e,
.cropper-line-w {
    width: 6px !important;
    cursor: ew-resize !important;
}

.cropper-line-n,
.cropper-line-s {
    height: 6px !important;
    cursor: ns-resize !important;
}

/* Hide resize handle dots; interaction is off by default, re-enabled when a
 * mask is active (see body.photowall-mask-resize-active rules below). */
.cropper-point {
    background-color: transparent !important;
    border: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    touch-action: none !important;
}

/* Corner points - invisible but functional */
.cropper-point-ne,
.cropper-point-nw,
.cropper-point-se,
.cropper-point-sw {
    width: 20px !important;
    height: 20px !important;
    cursor: nwse-resize !important;
}

.cropper-point-ne,
.cropper-point-sw {
    cursor: nesw-resize !important;
}

/* Edge points - invisible but functional */
.cropper-point-e,
.cropper-point-w {
    cursor: ew-resize !important;
    width: 10px !important;
    height: 100% !important;
}

.cropper-point-n,
.cropper-point-s {
    cursor: ns-resize !important;
    width: 100% !important;
    height: 10px !important;
}

/* Hide the dashed lines */
.cropper-dashed {
    display: none !important;
}

/* Hide center indicator */
.cropper-center {
    display: none !important;
}

/* Dark overlay for areas outside crop */
.cropper-modal {
    background-color: #000;
    opacity: 0.5;
}

/* Make crop area fully transparent (clear) */
.cropper-view-box {
    background: transparent;
}

/* Enable dragging on crop face */
.cropper-face {
    cursor: move !important;
    /* Use near-transparent background to ensure pointer events are captured */
    background-color: rgba(0, 0, 0, 0.01) !important;
    pointer-events: auto !important;
    touch-action: none !important;
}

.cropper-crop-box {
    cursor: move !important;
    pointer-events: auto !important;
    touch-action: none !important;
}

/* Disable pointer events on cropper overlay elements */
.cropper-drag-box {
    pointer-events: none !important;
    cursor: default !important;
}

.cropper-modal {
    pointer-events: none !important;
}

.cropper-wrap-box {
    pointer-events: none !important;
}

.cropper-canvas {
    pointer-events: none !important;
}

/* Ensure cropper container allows pointer events */
.cropper-container {
    pointer-events: auto !important;
}

/* ============================================
   SLIDER CONTROLS
   ============================================ */

/* Slider container wrapper */
.photowall-slider-wrapper {
    position: absolute;
    z-index: 9999 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.photowall-slider-wrapper * {
    pointer-events: auto !important;
    touch-action: manipulation;
}

.photowall-slider-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Horizontal slider (width) - positioned dynamically via JS */
.photowall-slider-horizontal {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Vertical slider (height) - positioned dynamically via JS */
.photowall-slider-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.photowall-slider-horizontal .photowall-slider-value {
    height: 100%;
    min-height: 36px;
    line-height: 36px;
    padding: 0 16px;
}

.photowall-slider-vertical .photowall-slider-value {
    width: 36px;
    line-height: 36px;
    padding: 16px 0;
}

/* Slider button styles */
.photowall-slider-btn {
    width: 36px;
    height: 36px;
    background: rgba(45, 45, 45, 0.9);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    padding: 0;
}


.photowall-slider-btn:hover {
    background: rgba(60, 60, 60, 0.95);
}

.photowall-slider-btn:active {
    background: rgba(80, 80, 80, 1);
}

.photowall-slider-btn svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

/* Slider value display */
.photowall-slider-value {
    background: rgba(45, 45, 45, 0.9);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    user-select: none;
}

@media (max-width: 768px) {
    .photowall-slider-value {
        font-size: 12px;
    }

    .photowall-slider-btn {
        width: 30px;
        height: 30px;
    }

    .photowall-slider-vertical .photowall-slider-value {
        width: 30px;
        line-height: 30px;
        padding: 5px 0;
    }

    .photowall-slider-horizontal .photowall-slider-value {
        min-height: 30px;
        line-height: 30px;
        padding: 0 5px;
    }

    /* Tab buttons */
    .photowall-dimensions-selector button {
        font-size: 11px;
        padding: 0 6px;
        gap: 4px;
        height: 42px;
        line-height: 1.2;
    }

    /* Material / mirror / option buttons */
    .photowall-check-button {
        font-size: 10px;
        height: 40px;
        line-height: 1.2;
        padding: 4px 4px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Labels above option groups */
    .photowall-label-option > span,
    .photowall-tooltip-info > span {
        font-size: 12px;
        margin: 6px 0 10px;
    }

    /* Tighter gap between option buttons */
    .photowall-fieldset-group {
        gap: 6px;
    }
}


/* Vertical slider value - rotated text */
.photowall-slider-vertical .photowall-slider-value {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

/* Arrow icons */
.photowall-arrow-left,
.photowall-arrow-right,
.photowall-arrow-up,
.photowall-arrow-down {
    display: block;
    width: 12px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
}

.photowall-arrow-left {
    transform: rotate(135deg);
    margin-left: 2px;
}

.photowall-arrow-right {
    transform: rotate(-45deg);
    margin-right: 2px;
}

.photowall-arrow-up {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.photowall-arrow-down {
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* Cropper container positioning for sliders */
.cropper-container {
    position: relative;
    z-index: 10;
}

/* Click blocker to prevent fotorama fullscreen */
.photowall-click-blocker {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    cursor: default;
    background: transparent;
    pointer-events: auto;
}

/* Ensure cropper elements above click blocker can receive events */
.cropper-container .photowall-slider-wrapper {
    z-index: 9999 !important;
}

/* Allow slider controls to receive events */
.photowall-slider-wrapper {
    pointer-events: auto;
}

/* ============================================
   CUSTOM IMAGE UPLOAD
   ============================================ */

.photowall-custom-image-group {
    flex-direction: column;
    align-items: stretch;
}

.photowall-custom-image-upload {
    width: 100%;
}

.photowall-custom-image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.photowall-custom-image-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border: 1px dashed #DBDBDB;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400;
    transition: border-color 0.2s, background-color 0.2s;
}

.photowall-custom-image-label:hover {
    border-color: #999;
    background-color: #fafafa;
}

.photowall-custom-image-info {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
    line-height: 1.3;
}

.photowall-custom-image-error {
    display: none;
    font-size: 12px;
    color: #e02b27;
    margin-top: 6px;
    line-height: 1.3;
}

.photowall-custom-image-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid #DBDBDB;
    background: #fff;
}

.photowall-custom-image-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #eee;
}

.photowall-custom-image-remove {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 6px 12px;
    border: 1px solid #DBDBDB;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: #e02b27;
    transition: background-color 0.2s, border-color 0.2s;
}

.photowall-custom-image-remove:hover {
    background-color: #fef0f0;
    border-color: #e02b27;
}

@media (max-width: 768px) {
    .photowall-custom-image-label {
        height: 42px;
        font-size: 11px;
    }

    .photowall-custom-image-thumb {
        width: 48px;
        height: 48px;
    }

    .photowall-custom-image-remove {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* ============================================
   STRIP LINES (50 CM)
   ============================================ */

.photowall-strip-overlay {
    position: absolute;
    z-index: 15;
    pointer-events: none;
    overflow: hidden;
}

.photowall-strip-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px dashed rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

/* Strip lines checkbox below gallery */
.photowall-strip-checkbox-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0 4px;
}

.photowall-strip-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    user-select: none;
    background-color: #F7F7F7;
    padding: 0 25px;
    min-width: 230px;
    height: 50px;
}

.photowall-strip-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.photowall-strip-checkbox-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 2px solid #999;
    background: #fff;
    flex-shrink: 0;
    transition: background-color 0.15s, border-color 0.15s;
}

.photowall-strip-checkbox-input:checked + .photowall-strip-checkbox-custom {
    background-color: #333;
    border-color: #333;
}

.photowall-strip-checkbox-input:checked + .photowall-strip-checkbox-custom::after {
    content: "";
    display: block;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.photowall-strip-checkbox-text {
    font-weight: 400;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .photowall-strip-checkbox-wrapper {
        padding: 8px 0 2px;
    }

    .photowall-strip-checkbox-label {
        font-size: 12px;
    }

    .photowall-strip-checkbox-custom {
        width: 18px;
        height: 18px;
    }
}

/* ====================================================================== */
/* Mask selector — uses standard photowall-button-group / check-button     */
/* styling. Only crop-box overlay styles live here.                       */
/* ====================================================================== */

/* Crop-box overlay container — sits exactly on top of the crop box */
.photowall-mask-overlay {
    position: absolute;
    z-index: 15;
    pointer-events: none;
    overflow: hidden;
}

/* Vertical-gap layout: gaps between panels are darkened so the panel areas
   stay clear and read as the "real" panels visually. */
.photowall-mask-gap {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Vertical / grid separator lines (thin, dark) */
.photowall-mask-line {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.photowall-mask-line-vertical {
    width: 1px;
    top: 0;
    bottom: 0;
}

.photowall-mask-line-horizontal {
    height: 1px;
    left: 0;
    right: 0;
}

/* Locked dimension inputs / slider arrows when a mask is active */
.photowall-input-locked {
    background-color: #f4f4f4 !important;
    cursor: not-allowed !important;
}

.photowall-slider-btn-disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ──────────────────────────────────────────────────────────────────────── */
/*  Mask resize-active state                                               */
/*  Only applied while a mask is selected. Shows a dashed border around    */
/*  the crop box and makes the corner/edge handles visible so the user     */
/*  knows they can grab and resize freely.                                 */
/* ──────────────────────────────────────────────────────────────────────── */
body.photowall-mask-resize-active .cropper-view-box {
    outline: 2px dashed #fff !important;
    outline-offset: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4) !important;
}

body.photowall-mask-resize-active .cropper-line {
    pointer-events: auto !important;
}

body.photowall-mask-resize-active .cropper-point {
    background-color: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.4) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: 10px !important;
    height: 10px !important;
}

body.photowall-mask-resize-active .cropper-point-n,
body.photowall-mask-resize-active .cropper-point-s {
    width: 14px !important;
    height: 6px !important;
}

body.photowall-mask-resize-active .cropper-point-e,
body.photowall-mask-resize-active .cropper-point-w {
    width: 6px !important;
    height: 14px !important;
}

/* ============================================================
   Modal "Porównanie materiałów" (info-icon trigger + overlay)
   ============================================================ */
.photowall-label-option > span.info-icon,
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    margin: 0 0 0 6px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-style: normal;
    font-family: 'Open Sans', var(--a2-font-base);
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
    transform: translateY(-2px);
    transition: opacity 150ms ease;
}
.info-icon:hover { opacity: 0.75; }

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 2147483600;
    padding: 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.modal[hidden] { display: none; }
.modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 640px;
    width: 100%;
    margin: auto 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    padding: 28px 32px;
}
.modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    color: #000;
    cursor: pointer;
    user-select: none;
    border-radius: 50%;
    transition: background 150ms ease;
}
.modal-close:hover { background: #f2f2f2; }
.modal-header { padding-right: 32px; margin-bottom: 12px; }
.modal-title { margin: 0; font-size: 20px; font-weight: 700; }
.modal-body { font-size: 14px; line-height: 1.6; color: #333; }
.modal-body p:last-child { margin-bottom: 0; }
body.modal-open { overflow: hidden; }

/* ============================================================
   Modal: porównanie materiałów (siatka kart)
   ============================================================ */
#material-comparison-fototapeta .modal-content {
    max-width: 1180px;
    background: #f6f6f6;
    border: 1px solid #dddddd;
    padding: 26px 18px 18px;
    margin: 0 auto !important;
}

@media (max-width: 768px) {
    #material-comparison-fototapeta .modal-content {
        margin: 0 auto !important;
    }
}
.material-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: stretch;
    border-top: 1px solid #e3e3e3;
    border-left: 1px solid #e3e3e3;
    background: #fff;
}
.material-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    border-right: 1px solid #e3e3e3;
    border-bottom: 1px solid #e3e3e3;
    background: #f9f9f9;
    position: relative;
    box-sizing: border-box;
}
.material-card--highlight { background: #f9f9f9; }
.material-card__top {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 18px 12px;
    min-height: 520px;
    box-sizing: border-box;
}
.material-card__image-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 36px;
    box-sizing: border-box;
}
/* FIX: Oryginalny rozmiar ikon materiałów (240x280 px) */
.material-card__image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: unset !important;
    overflow: visible !important;
}
.material-card__image img {
    width: 240px !important;
    height: 280px !important;
    max-width: 100% !important;
    object-fit: contain !important;
    transform: none !important;
}
.material-card__badge-row {
    position: absolute;
    right: 12px;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
}
.material-card__badge {
    position: static;
    width: 30px;
    height: 36px;
    border-radius: 0 0 14px 14px;
    background: #b49a7c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}
.material-card__badge svg { width: 16px; height: 16px; display: block; }
.material-card__name {
    margin: 0;
    font-size: 15px;
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4b4b4b;
}
.material-card__name strong {
    display: block;
    margin-top: 5px;
    font-size: 17px;
    line-height: 1.1;
    font-weight: 800;
    color: #1f1f1f;
}
.material-card--highlight .material-card__name,
.material-card--highlight .material-card__name strong { color: #b49a7c; }
.material-card__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #555;
}
.material-card__bottom {
    margin-top: auto;
    padding: 22px 18px 22px;
    background: #fafafa;
    min-height: 340px;
    box-sizing: border-box;
}
.material-card__spec-title {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #222;
}
.material-specs { list-style: none; margin: 0; padding: 0; }
.material-specs li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.45;
    color: #444;
    margin-bottom: 12px;
}
.material-specs li:last-child { margin-bottom: 0; }
.material-specs__icon {
    width: 18px;
    min-width: 18px;
    text-align: center;
    font-size: 14px;
    line-height: 1.3;
    color: #111;
    margin-top: 1px;
}

/* FIX: tekst nie mieści się w przycisku przy małych rozdzielczościach */
.photowall-check-button {
    height: auto !important;
    min-height: 48px !important;
    line-height: 1.3 !important;
    padding: 6px 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: normal !important;
    word-break: break-word !important;
}

@media (max-width: 1024px) {
    .material-grid { grid-template-columns: repeat(2, 1fr); }
    .material-card__top { min-height: auto; }
}
@media (max-width: 768px) {
    .photowall-check-button {
        min-height: 40px !important;
        padding: 6px 4px !important;
        font-size: 10px !important;
    }
    .photowall-fieldset-group {
        flex-wrap: wrap !important;
    }
}
@media (max-width: 640px) {
    .modal { padding: 12px; }
    .modal-content { padding: 22px 18px; }
    .modal-title { font-size: 17px; }
    .material-grid { grid-template-columns: 1fr; }
    .material-card__top, .material-card__bottom { min-height: auto; }
}
