/* LensPin Free v1.0 — Zero-Bloat Minimalist UI */
.lp-figure {
    margin: 0 0 1.25em;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.lp-align-center { margin-left: auto; margin-right: auto; }
.lp-align-left   { margin-right: auto; }
.lp-align-right  { margin-left: auto; }

.lp-compare,
.lp-hotspot {
    position: relative;
    display: block;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
    line-height: 0;
}

.lp-media-clip {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--lp-radius, 14px);
    box-shadow: 0 12px 32px rgba(15, 17, 22, 0.10), 0 1px 3px rgba(15, 17, 22, 0.06);
}

.lp-has-ratio {
    aspect-ratio: var(--lp-ratio, 16/10);
}
.lp-has-ratio .lp-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--lp-focal, 50% 50%);
}
.lp-img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

/* Fullscreen Mode */
.lp-compare:fullscreen,
.lp-hotspot:fullscreen {
    background: #0d0f14;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lp-compare:fullscreen .lp-media-clip,
.lp-hotspot:fullscreen .lp-media-clip {
    max-width: 100%;
    max-height: 94vh;
    width: auto;
    height: auto;
}
.lp-compare:fullscreen .lp-img,
.lp-hotspot:fullscreen .lp-img {
    max-height: 94vh;
    width: auto;
    object-fit: contain;
}

/* Before / After Comparison */
.lp-before-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    clip-path: inset(0 calc(100% - var(--lp-pos, 50%)) 0 0);
}
.lp-dir-vertical .lp-before-wrap {
    clip-path: inset(0 0 calc(100% - var(--lp-pos, 50%)) 0);
}
.lp-img-before {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--lp-focal, 50% 50%);
}

.lp-divider {
    position: absolute;
    top: 0; bottom: 0;
    left: var(--lp-pos, 50%);
    width: 2px;
    transform: translateX(-50%);
    background: var(--lp-line, rgba(255, 255, 255, 0.92));
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.30);
    cursor: ew-resize;
    touch-action: none;
    z-index: 4;
}
.lp-dir-vertical .lp-divider {
    top: var(--lp-pos, 50%);
    left: 0; right: 0; bottom: auto;
    width: 100%; height: 2px;
    transform: translateY(-50%);
    cursor: ns-resize;
}
.lp-divider:focus-visible .lp-handle {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.75), 0 8px 24px rgba(0, 0, 0, 0.3);
}

.lp-handle {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--lp-handle-bg, rgba(255, 255, 255, 0.94));
    color: var(--lp-handle-ink, #18181b);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid var(--lp-handle-ring, rgba(255, 255, 255, 0.85));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.16s ease;
}
.lp-compare:hover .lp-handle {
    transform: translate(-50%, -50%) scale(1.05);
}
.lp-compare.is-dragging .lp-handle {
    transform: translate(-50%, -50%) scale(1.10);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.18);
}

.lp-compare.is-resetting .lp-before-wrap,
.lp-compare.is-resetting .lp-divider {
    transition: clip-path 0.45s cubic-bezier(0.22, 1, 0.36, 1), left 0.45s cubic-bezier(0.22, 1, 0.36, 1), top 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark Frosted-Glass Badges + Smart Auto-Fade */
.lp-badge {
    position: absolute;
    top: 14px;
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.25px;
    background: var(--lp-badge-bg, rgba(15, 16, 20, 0.58));
    color: var(--lp-badge-ink, #ffffff);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.lp-badge-before { left: 14px; }
.lp-badge-after  { right: 14px; }
.lp-dir-vertical .lp-badge-after { top: auto; bottom: 14px; right: auto; left: 14px; }

.lp-badge.is-hidden { opacity: 0; transform: scale(0.94); }
.lp-badges-hover .lp-badge { opacity: 0; }
.lp-badges-hover:hover .lp-badge:not(.is-hidden),
.lp-badges-hover.is-dragging .lp-badge:not(.is-hidden) { opacity: 1; }

/* Fullscreen Button */
.lp-fs-btn {
    position: absolute;
    bottom: 12px; right: 12px;
    z-index: 6;
    width: 32px; height: 32px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 16, 20, 0.55);
    color: #ffffff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0.78;
    transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
}
.lp-fs-btn:hover { opacity: 1; background: rgba(15, 16, 20, 0.78); transform: scale(1.06); }

/* Editorial Caption */
.lp-caption {
    margin-top: 9px;
    font-size: 12.5px;
    line-height: 1.45;
    color: #646970;
    text-align: center;
}

/* Hotspots */
.lp-pin-wrap {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 8;
}
.lp-pin-wrap.is-open { z-index: 28; }

.lp-pin-dot {
    position: relative;
    width: 30px; height: 30px;
    padding: 0; border: none; background: transparent;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.lp-pin-core {
    width: 15px; height: 15px;
    border-radius: 50%;
    background: var(--lp-pin-bg, #ffffff);
    border: 2.5px solid var(--lp-pin-ring, #18181b);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.16s ease;
    position: relative; z-index: 2;
}
.lp-pin-dot:hover .lp-pin-core,
.lp-pin-wrap.is-open .lp-pin-core { transform: scale(1.22); }

.lp-pin-pulse {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    opacity: 0.55;
    animation: lpPulse 2.2s infinite ease-out;
}
@keyframes lpPulse {
    0%   { transform: scale(0.75); opacity: 0.75; }
    100% { transform: scale(1.9); opacity: 0; }
}

/* Desktop Floating Popover */
.lp-popover {
    position: absolute;
    width: 240px;
    border-radius: 13px;
    overflow: hidden;
    background: var(--lp-pop-bg, rgba(255, 255, 255, 0.96));
    color: var(--lp-pop-ink, #18181b);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--lp-border, rgba(0, 0, 0, 0.08));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
    line-height: 1.45;
    text-align: left;
    z-index: 35;
}
.lp-pop-body { padding: 12px 14px; }
.lp-pop-top    { bottom: calc(100% + 10px); }
.lp-pop-bottom { top: calc(100% + 10px); }
.lp-pop-center { left: 50%; transform: translateX(-50%); }
.lp-pop-left   { right: -6px; }
.lp-pop-right  { left: -6px; }

.lp-pop-title { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }
.lp-pop-desc  { margin: 0; font-size: 12.5px; opacity: 0.84; }
.lp-pop-link  { display: inline-block; margin-top: 9px; font-size: 12px; font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Mobile Bottom-Card Popover (Never clips on small screens) */
.lp-mobile-card {
    margin-top: 10px;
    border-radius: 12px;
    padding: 13px 15px;
    background: var(--lp-pop-bg, #ffffff);
    color: var(--lp-pop-ink, #18181b);
    border: 1px solid var(--lp-border, rgba(0, 0, 0, 0.1));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    line-height: 1.45;
    text-align: left;
}
@media (max-width: 600px) {
    .lp-popover { display: none !important; }
}
@media (min-width: 601px) {
    .lp-mobile-card { display: none !important; }
}

/* Presets */
.lp-preset-dark-glass {
    --lp-handle-bg: rgba(18, 20, 26, 0.86);
    --lp-handle-ink: #f5f5f7;
    --lp-handle-ring: rgba(255, 255, 255, 0.28);
    --lp-badge-bg: rgba(12, 14, 18, 0.74);
    --lp-badge-ink: #f5f5f7;
    --lp-pop-bg: rgba(18, 20, 26, 0.94);
    --lp-pop-ink: #f5f5f7;
    --lp-border: rgba(255, 255, 255, 0.16);
    --lp-pin-bg: #18181b;
    --lp-pin-ring: #ffffff;
}
.lp-preset-editorial {
    --lp-handle-bg: #f5f1e9;
    --lp-handle-ink: #30343a;
    --lp-handle-ring: rgba(48, 52, 58, 0.25);
    --lp-badge-bg: rgba(48, 52, 58, 0.78);
    --lp-badge-ink: #f5f1e9;
    --lp-pop-bg: #f5f1e9;
    --lp-pop-ink: #30343a;
    --lp-border: rgba(48, 52, 58, 0.18);
    --lp-pin-bg: #f5f1e9;
    --lp-pin-ring: #30343a;
}

.lp-placeholder {
    padding: 24px;
    border: 1px dashed #ccc;
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
    color: #666;
    background: #fafafa;
}
