/*
 * ba-gallery.css — native before/after gallery for the cleaning washer pages
 * (#17582). Styles match the Eddie-approved demo v2; rendered by
 * setupNativeBeforeAfter in js/site.js into #before-after-div. Linked only
 * from pages that have the before-and-after section, so www is unaffected.
 */

.ba-gallery {
  max-width: 720px;
  margin: 0 auto;
}

/* ---------- Slider container ---------- */
.ba-slider-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: #ddd;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.ba-slider-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}
.ba-img-after {
  clip-path: inset(0 0 0 50%);
}

/* Divider line */
.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  z-index: 3;
  pointer-events: none;
}

/* Handle — squared (border-radius 6px), not circular */
.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 4;
  pointer-events: none;
}
.ba-handle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #1493c3;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Labels */
.ba-label {
  position: absolute;
  top: 12px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  border-radius: 4px;
  z-index: 5;
  pointer-events: none;
  letter-spacing: 0.5px;
}
.ba-label-before {
  left: 12px;
  background: rgba(50, 50, 50, 0.82);
}
.ba-label-after {
  right: 12px;
  background: rgba(20, 147, 195, 0.88);
}

/* ---------- Case meta ---------- */
.ba-meta {
  padding: 14px 0 6px;
}
.ba-meta .ba-title {
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.ba-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ba-tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1.5px solid #1493c3;
  border-radius: 4px;
  font-size: 0.78rem;
  color: #1493c3;
  font-weight: 500;
}

/* ---------- Navigation buttons ----------
 * Full-width rectangular with border, squared corners — same look on all
 * viewports (blog.fixesarmy.com pattern). NOT circular. */
.ba-nav {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.ba-nav button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border: 1.5px solid #ddd;
  background: #fff;
  border-radius: 6px;
  color: #555;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.ba-nav button:active,
.ba-nav button:hover {
  background: #f0f7fc;
  border-color: #1493c3;
  color: #1493c3;
}
.ba-nav button:disabled {
  opacity: 0.35;
  cursor: default;
  background: #fafafa;
  border-color: #eee;
  color: #bbb;
}
.ba-nav button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Thumbnails ---------- */
.ba-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.ba-thumb {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
}
.ba-thumb.active {
  border-color: #1493c3;
}
.ba-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
