/* File: assets/css/style.css */

.dental-comparison-widget {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.dental-comparison-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;

}

.dental-comparison-before,
.dental-comparison-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.dental-comparison-before img,
.dental-comparison-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

.dental-comparison-after {
    clip-path: inset(0 0 0 50%);
    -webkit-clip-path: inset(0 0 0 50%);
}

.dental-comparison-label {
    position: absolute;
    top: 25px;
    padding: 7px 5px 3px;
    background: linear-gradient(135deg, var(--e-global-color-a066973), var(--e-global-color-3bc411b));
    color: white;
    font-weight: 700;
    font-size: 15px;
    border-radius: 8px;
    z-index: 10;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    line-height: 16px;
}

.before-label {
    left: 25px;
}

.after-label {
    right: 25px;
}

.dental-comparison-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 6px;
    height: 100%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dental-comparison-slider-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 1) 20%, 
        rgba(255, 255, 255, 1) 80%, 
        rgba(255, 255, 255, 0) 100%);
/*    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);*/
}

.dental-comparison-slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
       transform: translate(-50%, -50%) rotate(90deg);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,2555,255,0.2);
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    box-shadow: 
        0 5px 20px rgba(0, 0, 0, 0.3),
        inset 0 2px 5px rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 31;
}

.dental-comparison-slider-handle:active {
    cursor: grabbing;
/*    transform: translate(-50%, -50%) scale(0.95);*/
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.2),
        inset 0 2px 5px rgba(255, 255, 255, 0.9);
}

.dental-comparison-slider-handle:hover {
/*    transform: translate(-50%, -50%) scale(1.05);*/
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 2px 5px rgba(255, 255, 255, 0.8);
}

.dental-comparison-slider-handle svg {
    width: 18px;
    height: 18px;
    color: #333;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.dental-comparison-slider-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 25;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dental-comparison-slider:hover .dental-comparison-slider-arrows {
    opacity: 1;
}

.arrow-left, .arrow-right {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.arrow-left::after {
    content: "←";
}

.arrow-right::after {
    content: "→";
}

.dental-comparison-instruction {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 20px;
    margin: 0 auto;
    width: fit-content;
    z-index: 20;
    pointer-events: none;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dental-comparison-instruction span {
    font-weight: bold;
    color: #4CAF50;
    margin: 0 5px;
}

/* Hiệu ứng hover cho container */
/*.dental-comparison-container:hover .dental-comparison-slider-handle {
    transform: translate(-50%, -50%) scale(1.05);
}*/

/* Responsive */
@media (max-width: 768px) {
    .dental-comparison-container {
        height: 400px;
    }
    
    .dental-comparison-label {
        font-size: 14px;
        padding: 8px 15px;
        top: 15px;
    }
    
    .before-label {
        left: 15px;
    }
    
    .after-label {
        right: 15px;
    }
    
    .dental-comparison-slider-handle {
        width: 60px;
        height: 60px;
    }
    
    .dental-comparison-slider-handle svg {
        width: 24px;
        height: 24px;
    }
    
    .dental-comparison-instruction {
        font-size: 12px;
        padding: 6px 12px;
        bottom: 15px;
    }
}

@media (max-width: 480px) {
    .dental-comparison-container {
        height: 300px;
    }
    
    .dental-comparison-slider-handle {
        width: 50px;
        height: 50px;
    }
    
    .dental-comparison-slider-handle svg {
        width: 20px;
        height: 20px;
    }
    
    .dental-comparison-label {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Animation cho slider */
@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.dental-comparison-slider-handle.pulse {
    animation: pulse 2s infinite;
}