/* ==========================================================
NUREVA MODULE - COMPARISON COLUMNS
PREV PUBLISHED: OCTOBER 20, 2025
LAST PUBLISHED: OCTOBER 22, 2025
========================================================== */
.comp-cols {
  --space: 20px;
  --space-md: calc(var(--space) * 2);
  --content-max-width: 1330px;
  --column-width: 300px;
  --column-gap: 20px;
  --column-border-radius: 7px;
  --column-min-width: 280px;
  --column-max-width: 450px;
  /* CONTENT GROUP TAB COLOURS */
  --tab-bg-container: #e5e7eb;
  --tab-bg-inactive: transparent;
  --tab-bg-inactive-hover: #f3f4f6;
  --tab-bg-active: #222222;
  --tab-bg-active-hover: #34495e;
  --tab-text-inactive: #666;
  --tab-text-inactive-hover: #333;
  --tab-text-active: #fff;
  margin: 0;
  padding: 0;
}

/* =========================================
/* COMP COLS CONTENT
/* ====================================== */
.comp-cols.content {
  display: grid;
  grid-template-columns: [full-start] 1fr [content-start] min(var(--content-max-width), 100% - var(--space-md) * 2) [content-end] 1fr [full-end];
}
.comp-cols.content > *:not(.content-group) {
  grid-column: content;
}
.comp-cols.content > * + * {
  margin-block-start: 0;
}

/* =========================================
/* COLUMN GROUPS
/* ====================================== */
.comp-cols .content-group {
  display: none;
  grid-column: full;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  width: 100%;
}

.comp-cols .content-group.active {
  display: grid;
  grid-template-columns: inherit;
  animation: fadeIn 0.3s ease-in-out forwards;
}

/* =========================================
/* COLUMN GROUP TABS
/* ====================================== */
.comp-cols .content-group-tabs {
  grid-column: content;
  display: inline-flex;
  justify-content: center;
  gap: 0.25rem;
  background: var(--tab-bg-container);
  border-radius: 50px;
  padding: 0.5rem;
  width: fit-content;
  margin-inline: auto;
}

.comp-cols .content-group-tab {
  padding: 0.75rem 1.5rem;
  border: none;
  background: var(--tab-bg-inactive);
  color: var(--tab-text-inactive);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.comp-cols .content-group-tab:hover {
  background: var(--tab-bg-inactive-hover);
  color: var(--tab-text-inactive-hover);
}

.comp-cols .content-group-tab.active,
.comp-cols .content-group-tab.active:focus {
  background: var(--tab-bg-active);
  color: var(--tab-text-active);
}

.comp-cols .content-group-tab.active:hover {
  background: var(--tab-bg-active-hover);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* =========================================
/* GALLERY CONTAINER
/* ====================================== */
.comp-cols .gallery-container {
  grid-column: full;
  position: relative;
  display: grid;
  grid-template-columns: inherit;
}

.comp-cols .gallery {
  grid-column: full;
  display: grid;
  grid-template-columns: inherit;
  overflow-x: scroll;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-padding-left: max(var(--space-md), calc((100vw - var(--content-max-width)) / 2));
  /*border: 2px solid black;*/
}

.comp-cols .gallery::-webkit-scrollbar {
  inline-size: 0 !important;
  display: none;
}

.comp-cols .gallery .wrapper {
  grid-column: content;
  display: flex;
  align-items: top;
  gap: clamp(5px, 2vw, var(--column-gap));
  padding-block: var(--space);
}

.comp-cols .gallery.centered-columns:not(.has-overflow) .wrapper {
  justify-content: center;
}

.comp-cols .gallery.centered-columns:not(.has-overflow) .wrapper::after {
  content: none;
}

.comp-cols .gallery .wrapper::after {
  content: "";
  align-self: stretch;
  padding-inline-end: max(var(--column-gap), (100vw - var(--content-max-width)) / 2 - var(--column-gap));
}

/* =========================================
/* SCROLL CONTROLS
/* ====================================== */
.comp-cols .scroll-controls {
  grid-column: content;
  position: absolute;
  bottom: 20px;
  right: 0;
  display: flex;
  gap: 0.5rem;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.comp-cols .scroll-controls.visible {
  opacity: 1;
}

.comp-cols .scroll-controls.stuck {
  position: fixed;
  bottom: 20px;
  top: auto;
}

.comp-cols .scroll-controls-inner {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  pointer-events: auto;
}

.comp-cols .scroll-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #bcbec0;
  padding: 0;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.comp-cols .scroll-btn i {
  transition: color 250ms ease-in-out, transform 250ms ease-in-out;
  color: #6d6e71;
}

.comp-cols .scroll-btn:focus {
  background: inherit;
  background: #bcbec0;
}

.comp-cols .scroll-btn:hover:not(:disabled) {
  transform: scale(1.05);
  background-color: #a7a9ac;
}
.comp-cols .scroll-btn:hover:not(:disabled) i {
  transform: scale(1.05);
  color: #f2f2f2;
}

.comp-cols .scroll-btn:disabled {
  background: #dcdcde;
  cursor: not-allowed;
}
.comp-cols .scroll-btn:disabled i {
  opacity: 0.4;
}

/* =========================================
/* IMAGE LOADING ANIMATION
/* ====================================== */
.comp-cols .image-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.comp-cols .dancin-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 60px; /* Ensures space for 3 dots (12px each) + 2 gaps (8px each) = 44px + padding */
}

.comp-cols .dancin-dots::before,
.comp-cols .dancin-dots::after,
.comp-cols .dancin-dots .dot-middle {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  background: #0099cc;
  border-radius: 50%;
  animation: dancin 1.4s ease-in-out infinite;
}

.comp-cols .dancin-dots::before {
  animation-delay: -0.48s;
}

.comp-cols .dancin-dots .dot-middle {
  animation-delay: -0.24s;
}

.comp-cols .dancin-dots::after {
  animation-delay: 0s;
}

@keyframes dancin {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
/* =========================================
/* PRODUCT COLUMNS
/* ====================================== */
.comp-cols .product-column {
  display: block;
  /*background: #fff;*/
  text-align: center;
  width: clamp(275px, 40vw, var(--column-width));
  min-width: 275px;
  max-width: var(--column-max-width);
  flex: 0 0 clamp(275px, 40vw, var(--column-width));
  padding-block-end: 20px;
  border-radius: var(--column-border-radius);
  transition: all 0.3s ease;
  overflow: clip;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

/* =========================================
/* PRODUCT COLUMN VARIATIONS
/* ====================================== */
.comp-cols .product-column.col-regular {
  border: none;
  box-shadow: none;
}

/* =========================================
/* PRODUCT COLUMN IMAGES
/* ====================================== */
.comp-cols .column-image-wrapper {
  position: relative;
}

.comp-cols .column-image {
  position: relative;
  min-height: 100px; /* Prevents collapse during image swap */
}

.comp-cols .column-image img {
  max-width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

/* =========================================
/* IMAGE TOGGLES
/* ====================================== */
.comp-cols .color-toggle {
  display: none;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.comp-cols .toggle-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  margin-bottom: 20px;
}

.comp-cols .toggle-indicator.primary {
  background: #000;
}

.comp-cols .toggle-indicator.secondary {
  background: #fff;
}

.comp-cols .toggle-indicator.active {
  border-color: #09c;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* =========================================
/* TEXT BLOCKS
/* ====================================== */
.comp-cols .text-blocks-container {
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--space-md));
  margin: 0 auto;
}

.comp-cols .text-block.border-top {
  border-top: 1px solid #e5e7eb;
}

.comp-cols .text-block.border-bottom {
  border-bottom: 1px solid #e5e7eb;
}

/* =========================================
/* STICKY BLOCKS
/* ====================================== */
.comp-cols .sticky-block {
  z-index: 100;
  background: transparent;
  /*margin-block: 0 20px;*/
}

/* /end-comparison-columns */
