@import url("configuratore.css?v=18.06.2026.1");

/* ============================================================
   CONFIGURATORE MODULARI
   Usa le classi visuali del configuratore esistente e aggiunge
   solo gli ID/elementi specifici del motore modulare.
   ============================================================ */

#configuratore-modulari-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9;
    display: none;
    overflow: hidden;
    opacity: 0;
}

#configuratore-modulari-overlay.is-open {
    display: flex;
    flex-direction: column;
    animation: configuratore-fadein 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#configuratore-modulari-overlay.is-open .configuratore-image-col {
    animation: configuratore-slideup 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

#configuratore-modulari-overlay.is-open .configuratore-panel-col {
    animation: configuratore-slideup-panel 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

#configuratore-modulari-overlay.is-closing {
    animation: configuratore-fadeout 0.28s ease forwards;
    pointer-events: none;
}

.cfgm-image-wrapper {
    padding-bottom: 128px;
}

#configuratore-modulari-overlay .cfgm-product-canvas {
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 5 / 3;
    background: #f3f3f3;
    line-height: 1;
}

.cfgm-wallpaper-surface,
.cfgm-selection-area {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.cfgm-wallpaper-surface {
    z-index: 1;
    background: #f6f6f6;
}

.cfgm-roll-tile {
    position: absolute;
    top: 0;
    bottom: 0;
    background-repeat: repeat-y;
    background-position-x: center;
    background-size: 100% auto;
}

.cfgm-selection-area {
    z-index: 4;
    pointer-events: none;
}

.cfgm-wall-area {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
    z-index: 7;
    pointer-events: none;
}

.cfgm-guides {
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
}

.cfgm-guide-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1px dashed rgba(0, 0, 0, 0.72);
}

#configuratore-modulari-overlay .cfg-trim-top,
#configuratore-modulari-overlay .cfg-trim-bottom,
#configuratore-modulari-overlay .cfg-trim-left,
#configuratore-modulari-overlay .cfg-trim-right {
    z-index: 6;
    right: auto;
    bottom: auto;
    background-color: rgba(192, 57, 43, 0.32);
    background-image: repeating-linear-gradient(
        135deg,
        rgba(192, 57, 43, 0.22) 0,
        rgba(192, 57, 43, 0.22) 5px,
        rgba(255, 255, 255, 0.2) 5px,
        rgba(255, 255, 255, 0.2) 10px
    );
}

#configuratore-modulari-overlay.cfgm-hide-trim .cfg-trim-top,
#configuratore-modulari-overlay.cfgm-hide-trim .cfg-trim-bottom,
#configuratore-modulari-overlay.cfgm-hide-trim .cfg-trim-left,
#configuratore-modulari-overlay.cfgm-hide-trim .cfg-trim-right,
#configuratore-modulari-overlay.cfgm-hide-trim #cfgm-trim-alert {
    display: none;
}

#configuratore-modulari-overlay.cfgm-hide-guides #cfgm-guides {
    display: none;
}

#configuratore-modulari-overlay.cfgm-hide-roll-numbers #cfgm-rolli-bar {
    display: none;
}

#cfgm-trim-alert {
    margin-top: 18px;
}

#cfgm-rolli-bar {
    margin-top: 8px;
}

#cfgm-rolli-bar .configuratore-rollo-item {
    position: relative;
}

#configuratore-modulari-overlay .configuratore-color-swatch img,
#configuratore-modulari-overlay .cfg-info-swatch img {
    transform: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cfgm-actions {
    grid-template-columns: 1fr 1fr;
}

.cfgm-actions .configuratore-action-btn,
.cfgm-actions .configuratore-dropdown .dropdown-toggle,
.cfgm-actions .configuratore-name-input,
.cfgm-actions .configuratore-download-btn {
    min-height: 48px;
}

.cfgm-info-row--2 {
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
}

.cfgm-variant-info .cfg-info-value {
    max-width: 230px;
}

#cfgm-selected-roll-size {
    min-width: 42px;
}

#cfgm-selected-roll-width,
#cfgm-selected-rapport {
    font-size: 18px;
}

#cfgm-simulation-overlay {
    position: fixed;
    inset: 0;
    background-color: #000;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#cfgm-simulation-overlay.is-open {
    display: flex;
    opacity: 0;
    animation: cfg-sim-fadein 0.3s ease forwards;
}

#cfgm-simulation-overlay.is-closing {
    animation: cfg-sim-fadeout 0.25s ease forwards;
    pointer-events: none;
}

#cfgm-simulation-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    z-index: 10001;
    opacity: 0.85;
    transition: opacity 0.2s;
    font-weight: 300;
}

#cfgm-simulation-close:hover {
    opacity: 1;
}

#cfgm-simulation-img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.cfg-simulation-content.is-loading #cfgm-simulation-img {
    opacity: 0;
}

@media (max-width: 1199px) {
    .cfgm-info-row--2 {
        grid-template-columns: 1fr;
        row-gap: 10px;
    }
}

@media (max-width: 991px) {
    #configuratore-modulari-overlay .cfgm-product-canvas {
        aspect-ratio: 4 / 3;
    }

    .cfgm-actions {
        grid-template-columns: 1fr;
    }
}
