/**
 * SimCzech Screenshot Comparator — Before/After Slider
 * Dark theme kompatibilní
 */

/* Container */
.sc-compare {
  margin: 2rem 0;
  max-width: 100%;
}

.sc-compare__wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--sc-border, #334155);
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  aspect-ratio: 16 / 9;
  background: var(--sc-bg-card, #1e293b);
}

/* After (spodní vrstva — plná šířka) */
.sc-compare__after {
  position: absolute;
  inset: 0;
}

.sc-compare__after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Before (horní vrstva — oříznutá) */
.sc-compare__before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
}

.sc-compare__before img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Labels */
.sc-compare__label {
  position: absolute;
  top: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.sc-compare__label--before {
  left: 12px;
  background: rgba(245, 158, 11, 0.9);
  color: #000;
}

.sc-compare__label--after {
  right: 12px;
  background: rgba(59, 130, 246, 0.9);
  color: #fff;
}

/* Handle (slider line) */
.sc-compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  z-index: 10;
  outline: none;
}

.sc-compare__handle-line {
  flex: 1;
  width: 2px;
  background: var(--sc-accent, #f59e0b);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.sc-compare__handle-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sc-accent, #f59e0b);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}

.sc-compare__handle-circle svg {
  width: 16px;
  height: 16px;
}

.sc-compare__handle:hover .sc-compare__handle-circle,
.sc-compare__handle:focus .sc-compare__handle-circle {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.sc-compare--active .sc-compare__handle-circle {
  transform: scale(1.15);
}

/* Mobile */
@media (max-width: 768px) {
  .sc-compare__handle-circle {
    width: 36px;
    height: 36px;
  }

  .sc-compare__handle-circle svg {
    width: 14px;
    height: 14px;
  }

  .sc-compare__label {
    font-size: 0.65rem;
    padding: 3px 8px;
  }
}
