/** Shopify CDN: Minification failed

Line 9:0 Comments in CSS use "/* ... */" instead of "//"
Line 10:43 Unexpected ";"
Line 11:61 Unexpected ";"
Line 159:0 Expected "}" to go with "{"

**/
// gown-builder-swatches.js
window.PaperDolls = window.PaperDolls || {};
window.PaperDolls.swatches = window.PaperDolls.swatches || {};

console.log('Paper Dolls: swatches module loaded');

/* === PAPER DOLLS BUILDER – PRODUCT CARD SWATCHES (True Colors style) === */

.builder26-swatch-wrap {
  display: flex;
  align-items: center;
    justify-content: center;  
  flex-wrap: wrap;
  column-gap: 8px;
  row-gap: 8px;
  margin-top: 0.35rem;
  position: relative;
  overflow: visible; /* allow tooltips to show */
   flex-wrap: nowrap;              /* <-- force one row by default */
}

/* when expanded, THEN allow wrapping of all dots */
.builder26-swatch-wrap.builder26-swatch-wrap--expanded {
  flex-wrap: wrap;                /* <-- multiple rows only after expand */
}

.builder26-swatch-row {
   display: inline-flex;             /* key change */
  align-items: center;
  gap: 6px;
    flex: 0 0 auto;                   /* don't grow, don't shrink */
  overflow: visible;              /* <-- no clipping of tooltips */
}

/* Circle chips – force them to ignore theme button styling */
.builder26-swatch {
  --builder26-swatch-size: 18px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: var(--builder26-swatch-size);
  height: var(--builder26-swatch-size);

  border-radius: 50% !important;
  border: 1px solid rgba(0,0,0,.18);
  background: var(--builder26-swatch-color, #fff);
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
  appearance: none;
  cursor: default;
  position: relative;
}

.builder26-swatch--selected {
  box-shadow: 0 0 0 2px rgba(0,0,0,.08) inset, 0 0 0 2px #0002;
  border-color: rgba(0,0,0,.45);
}

/* Tooltip label on hover */
.builder26-swatch-label {
  display: none;
  position: absolute;
  top: 115%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  background: #fff;
  color: #333;
  padding: 2px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 20;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.builder26-swatch:hover .builder26-swatch-label {
  display: block;
}

/* Hidden until expanded */
.builder26-swatch--hidden {
  display: none !important;
}

.builder26-swatch-expander {
  /* strip out pill/button look */
  border: none;
  background: none;
  padding: 0;
  margin-left: 6px;

  font-size: 13px;
  color: #555;
  cursor: pointer;

  height: auto;
  line-height: 1;
  border-radius: 0;
}
/* Center "+ more" vertically with the circles */
.builder26-swatch-expander {
  align-self: center;      /* anchor to the middle of the row */
  line-height: 1;          /* removes extra vertical padding */
  padding-top: 0;          /* ensure no inherited button padding creeps in */
  padding-bottom: 0;
  transform: translateY(7px);  /* tiny nudge to match optical center */
}


.builder26-swatch-expander:hover {
  color: #222;
}

.builder26-swatch-expander:focus {
  outline: 1px dotted #555;
  outline-offset: 1px;
}


/* Expanded state – reveal hidden dots & allow wrap */
.builder26-swatch-wrap.builder26-swatch-wrap--expanded .builder26-swatch-row {
  flex-wrap: wrap;
  overflow: visible;
}
.builder26-swatch-wrap.builder26-swatch-wrap--expanded .builder26-swatch--hidden {
  display: inline-flex !important;
}
.builder26-option-card {
  overflow: visible;   /* allow tooltip to extend past inner box */
}
/* "+ more" stays inline and narrow */
.builder26-swatch-expander {
  display: inline-flex;             /* kill any theme block/100% width */
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;                   /* no flex-grow */
  width: auto;                      /* override theme width:100% */

  .builder26-swatch--image {
  background-color: transparent !important;
}

.builder26-swatch--image::before {
  display: none !important;
}
