/* foto-comparacao.css — Slider comparação Antes/Depois (CSS puro) */

.foto-comparacao-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.foto-comparacao-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.foto-comparacao-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.foto-comparacao-clip {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--slider-pos, 50%);
    height: 100%;
    overflow: hidden;
}

.foto-comparacao-clip .foto-antes {
    width: 100%;
    min-width: 0;
}

.foto-comparacao-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    z-index: 10;
    -webkit-appearance: none;
    appearance: none;
}

.foto-comparacao-handle {
    position: absolute;
    top: 0;
    left: var(--slider-pos, 50%);
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: white;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
    z-index: 5;
    pointer-events: none;
}

.foto-comparacao-handle::before,
.foto-comparacao-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border-style: solid;
}

.foto-comparacao-handle::before {
    left: -8px;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-color: transparent white transparent transparent;
}

.foto-comparacao-handle::after {
    right: -8px;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent white;
}

.foto-comparacao-labels {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 4;
    pointer-events: none;
}

.foto-label {
    background: rgba(0, 0, 0, 0.55);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Clip precisa herdar o tamanho do container pai para manter a proporção */
.foto-comparacao-container .foto-comparacao-clip .foto-antes {
    width: calc(100% / (var(--slider-pos, 50) / 100));
    max-width: none;
}
