/* TXOME Tinted / Gradient Lens Simulator v2 */

.TxomeTintedSimV2 {
  --txome-sim-bg: #0b0f14;
  --txome-sim-panel: #f6f7f9;
  --txome-sim-text: #111827;
  --txome-sim-muted: #6b7280;
  --txome-sim-border: rgba(15, 23, 42, 0.12);
  --txome-sim-accent: #0e6f80;
  --txome-sim-radius: 8px;
  --txome-sim-split: 50%;
  font-family: var(--font-body-family, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif);
  color: var(--txome-sim-text);
  width: 100%;
  padding-top: 0;
  padding-bottom: 24px;
}

.TxomeTintedSimV2 * {
  box-sizing: border-box;
}

.TxomeTintedSimV2__layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 900px) {
  .TxomeTintedSimV2__layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

@media (max-width: 899px) {
  .TxomeTintedSimV2__layout {
    gap: 12px;
  }
}

.TxomeTintedSimV2__left {
  flex: 1.6;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.TxomeTintedSimV2__preview {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--txome-sim-radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.13);
  user-select: none;
  touch-action: none;
  --split: var(--txome-sim-split);
}

.TxomeTintedSimV2__labels {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 5;
  pointer-events: none;
}

.TxomeTintedSimV2__label {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.TxomeTintedSimV2__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.TxomeTintedSimV2__tint {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  right: 0;
  background: var(--tint-color, transparent);
  opacity: var(--tint-opacity, 0);
  mix-blend-mode: var(--tint-blend-mode, multiply);
  pointer-events: none;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.TxomeTintedSimV2__handle {
  position: absolute;
  top: 0;
  left: var(--split);
  transform: translateX(-50%);
  height: 100%;
  width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  cursor: ew-resize;
}

.TxomeTintedSimV2__handleLine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}

.TxomeTintedSimV2__handleGrip {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 2;
  transition: transform 0.15s ease, background 0.15s ease;
}

.TxomeTintedSimV2__handle:hover .TxomeTintedSimV2__handleGrip,
.TxomeTintedSimV2__handle:focus-visible .TxomeTintedSimV2__handleGrip {
  transform: scale(1.08);
  background: rgba(0, 0, 0, 0.75);
}

.TxomeTintedSimV2__arrow {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.TxomeTintedSimV2__arrow--left {
  border-right: 7px solid rgba(255, 255, 255, 0.85);
}

.TxomeTintedSimV2__arrow--right {
  border-left: 7px solid rgba(255, 255, 255, 0.85);
}

.TxomeTintedSimV2__controls {
  flex: 0.9;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.TxomeTintedSimV2__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.TxomeTintedSimV2__titleRow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.TxomeTintedSimV2__title {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 800;
  line-height: 1.2;
}

.TxomeTintedSimV2__titleLabel {
  font-weight: 400;
  font-size: 0.85em;
}

.TxomeTintedSimV2__desc {
  margin: 0;
  color: var(--txome-sim-muted);
  font-size: 14px;
  line-height: 1.5;
}

.TxomeTintedSimV2__desc--desktop {
  display: none;
}

.TxomeTintedSimV2__sliderHint {
  margin: 0;
  color: var(--txome-sim-muted);
  font-size: 13px;
  line-height: 1.4;
}

.TxomeTintedSimV2__sliderHint--desktop {
  display: none;
}

.TxomeTintedSimV2__sectionTitle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--txome-sim-muted);
}

.TxomeTintedSimV2__helpBtn {
  margin-left: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(17, 24, 39, 0.2);
  background: #fff;
  color: #1f2937;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.TxomeTintedSimV2__helpBtn--mobileOnly {
  display: inline-flex;
}

.TxomeTintedSimV2__helpBtn:hover,
.TxomeTintedSimV2__helpBtn:focus-visible {
  border-color: rgba(17, 24, 39, 0.5);
  background: rgba(9, 27, 78, 0.08);
  color: #091b4e;
}

.TxomeTintedSimV2__helpPopover {
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 6px);
  z-index: 30;
  max-width: min(320px, calc(100vw - 24px));
  min-width: 200px;
  background: #fff;
  color: #111827;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  font-size: 12px;
  line-height: 1.4;
}

.TxomeTintedSimV2__helpText {
  margin: 0;
}

.TxomeTintedSimV2__helpText--secondary {
  margin-top: 8px;
}

@media (min-width: 900px) {
  .TxomeTintedSimV2__desc--desktop {
    display: block;
  }

  .TxomeTintedSimV2__sliderHint--desktop {
    display: block;
  }

  .TxomeTintedSimV2__helpBtn--mobileOnly {
    display: none;
  }
}

.TxomeTintedSimV2__sceneList,
.TxomeTintedSimV2__lensList {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

@media (min-width: 900px) {
  .TxomeTintedSimV2__sceneList,
  .TxomeTintedSimV2__lensList {
    flex-wrap: wrap;
    overflow: visible;
  }

  .TxomeTintedSimV2__sceneList {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .TxomeTintedSimV2__sceneItem {
    min-width: 0;
    width: 100%;
  }

  .TxomeTintedSimV2__sceneThumb {
    height: 78px;
  }

  .TxomeTintedSimV2__sceneName {
    font-size: 12px;
    padding: 5px 8px;
  }
}

.TxomeTintedSimV2__sceneItem,
.TxomeTintedSimV2__lensItem {
  border: 1px solid transparent;
  background: var(--txome-sim-panel);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  scroll-snap-align: start;
}

.TxomeTintedSimV2__sceneItem {
  min-width: 96px;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.TxomeTintedSimV2__lensItem {
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 6px;
  justify-content: center;
}

.TxomeTintedSimV2__sceneItem:hover,
.TxomeTintedSimV2__lensItem:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.12);
}

.TxomeTintedSimV2__sceneItem.is-active,
.TxomeTintedSimV2__lensItem.is-active {
  border-color: var(--txome-sim-accent);
  box-shadow: 0 0 0 2px rgba(19, 127, 236, 0.2);
}


.TxomeTintedSimV2__sceneThumb {
  width: 100%;
  height: 88px;
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  background: #e5e7eb;
}

.TxomeTintedSimV2__sceneItem::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent);
  pointer-events: none;
}

.TxomeTintedSimV2__sceneName {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  z-index: 2;
  background: rgba(9, 27, 78, 0.7);
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

@media (max-width: 899px) {
  .TxomeTintedSimV2__controls {
    gap: 12px;
  }

  .TxomeTintedSimV2__sectionTitle {
    margin-bottom: 6px;
  }

  .TxomeTintedSimV2__sceneList,
  .TxomeTintedSimV2__lensList {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding: 2px 1.5rem 0;
    gap: 10px;
    scroll-padding-left: 1.5rem;
    scroll-padding-right: 1.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .TxomeTintedSimV2__sceneItem,
  .TxomeTintedSimV2__lensItem {
    scroll-snap-align: center;
  }

  .TxomeTintedSimV2__sceneList::-webkit-scrollbar,
  .TxomeTintedSimV2__lensList::-webkit-scrollbar {
    display: none;
  }

  .TxomeTintedSimV2__sceneItem.is-active {
    box-shadow: 0 0 0 3px rgba(19, 127, 236, 0.55),
      0 10px 20px rgba(19, 127, 236, 0.18),
      inset 0 0 0 2px rgba(255, 255, 255, 0.9);
  }

  .TxomeTintedSimV2__lensItem.is-active {
    box-shadow: 0 0 0 3px rgba(19, 127, 236, 0.55),
      0 6px 14px rgba(19, 127, 236, 0.18),
      inset 0 0 0 2px rgba(255, 255, 255, 0.9);
  }

  .TxomeTintedSimV2__sceneItem::after {
    height: 58%;
  }

  .TxomeTintedSimV2__sceneName {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
    padding: 6px 10px;
  }
}


.TxomeTintedSimV2__swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.TxomeTintedSimV2__swatchImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.TxomeTintedSimV2__ctaWrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.TxomeTintedSimV2__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: #111827;
  transition: transform 0.15s ease, background 0.2s ease;
}

.TxomeTintedSimV2__cta--lens {
  --lens-btn-c1: var(--txome-sim-accent);
  --lens-btn-c2: var(--txome-sim-accent);
  background: linear-gradient(135deg, var(--lens-btn-c1), var(--lens-btn-c2));
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-shadow: none;
}

.TxomeTintedSimV2__cta:hover {
  transform: translateY(-1px);
}

.TxomeTintedSimV2__cta[aria-hidden="true"] {
  display: none;
}

.TxomeTintedSimV2__sceneItem:focus-visible,
.TxomeTintedSimV2__lensItem:focus-visible,
.TxomeTintedSimV2__handle:focus-visible,
.TxomeTintedSimV2__cta:focus-visible {
  outline: 2px solid var(--txome-sim-accent);
  outline-offset: 2px;
}

@media (max-width: 899px) {
  .TxomeTintedSimV2__handleLine {
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  }
}

@media (max-width: 749px) {
  .TxomeTintedSimV2 {
    padding-top: 0;
  }

  .TxomeTintedSimV2__preview {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 560px) {
  .TxomeTintedSimV2__preview {
    width: calc(100% + 28px);
    margin-left: -14px;
    margin-right: -14px;
  }
}
