/* ============================================================
   FRONTEND
   ============================================================ */

.wp-block-mva-compare {
    margin-bottom: 20px;
}

.cad-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #000;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    touch-action: pan-y;
}

.cad-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

.cad-img-antes {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
    -webkit-clip-path: inset(0 50% 0 0);
}

.cad-divisor-barra {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ffffff;
    z-index: 3;
    pointer-events: none;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.cad-divisor-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 4;
    pointer-events: none;
}

.cad-divisor-handle::before,
.cad-divisor-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    transform: translateY(-50%);
}

.cad-divisor-handle::before {
    border-right: 8px solid #333;
    left: 10px;
}

.cad-divisor-handle::after {
    border-left: 8px solid #333;
    right: 10px;
}

/* Slider invisível cobrindo toda a área (protegido contra CSS do tema) */
.cad-container .cad-slider {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    opacity: 0 !important;
    z-index: 10 !important;
    cursor: ew-resize;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    -webkit-appearance: none;
    appearance: none;
    background: transparent !important;
    pointer-events: auto !important;
}

.cad-container .cad-slider::-webkit-slider-runnable-track {
    height: 100%;
    background: transparent;
}

.cad-container .cad-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 50px;
    height: 100vh;
    cursor: ew-resize;
    border: none;
}

.cad-container .cad-slider::-moz-range-track {
    height: 100%;
    background: transparent;
}

.cad-container .cad-slider::-moz-range-thumb {
    width: 50px;
    height: 100vh;
    cursor: ew-resize;
    border: none;
    border-radius: 0;
}

/* ============================================================
   EDITOR
   ============================================================ */

.cad-backend-wrapper {
    background: #ffffff;
    border: 1px solid #dcdcde;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
    margin: 20px 0;
}

.cad-backend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #dcdcde;
    gap: 1px;
}

.cad-backend-slot {
    background: #ffffff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cad-label {
    font-size: 11px;
    font-weight: 700;
    color: #757575;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.cad-image-dropzone {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f6f7f7;
    border: 2px dashed #c3c4c7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.cad-image-dropzone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cad-upload-placeholder {
    text-align: center;
    color: #50575e;
}
