/* ==========================================================================
   Dotekománie - Nativní Before/After Photo Comparison Slider
   Verze: 1.0.0
   ========================================================================== */

#desktop .dt-ba-wrap {
    max-width: 700px;
    margin: 32px auto;
}

#mobile .dt-ba-wrap {
    width: calc(100% - 20px);
    max-width: 100%;
    margin: 24px auto;
}

/* Fallback pokud není specifikován desktop/mobile obal */
.dt-ba-wrap {
    width: calc(100% - 20px);
    max-width: 700px;
    margin: 28px auto;
    box-sizing: border-box;
    position: relative;
    clear: both;
}

.dt-ba-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    background-color: #f2f2f2;
    line-height: 0;
}

.dt-ba-container img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.dt-ba-container .dt-ba-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
    -webkit-clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}

.dt-ba-container .dt-ba-handle-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos, 50%);
    width: 2px;
    background: #ffffff;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.45);
    z-index: 5;
}

.dt-ba-container .dt-ba-handle-btn {
    position: absolute;
    top: 50%;
    left: var(--pos, 50%);
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222222;
}

.dt-ba-container .dt-ba-handle-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

.dt-ba-container .dt-ba-label {
    position: absolute;
    top: 10px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 4px;
    pointer-events: none;
    z-index: 4;
    line-height: 1.3;
}

.dt-ba-container .dt-ba-label-before {
    left: 10px;
}

.dt-ba-container .dt-ba-label-after {
    right: 10px;
}

.dt-ba-container .dt-ba-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    margin: 0;
    padding: 0;
    z-index: 10;
    -webkit-appearance: none;
    appearance: none;
    touch-action: pan-y;
}

/* Odkazy na originály fotografií pod sliderem */
.dt-ba-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 0 2px;
    font-size: 12px;
    line-height: 1.4;
}

.dt-ba-link {
    color: #767676;
    text-decoration: none;
    transition: color 0.15s ease;
}

.dt-ba-link:hover {
    color: var(--color-primary, #c00);
    text-decoration: underline;
}

.dark .dt-ba-container {
    background-color: #1e1e1e;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.dark .dt-ba-link {
    color: #999999;
}

.dark .dt-ba-link:hover {
    color: var(--color-primary-dark, #ff4d6d);
}
