/* 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 */
.cropper-line {
    background-color: rgba(255, 255, 255, 0) !important;
    opacity: 1 !important;
    pointer-events: auto !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 but keep them functional */
.cropper-point {
    background-color: transparent !important;
    border: none !important;
    opacity: 0 !important;
    pointer-events: auto !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;
}
