/* Color Picker V2 Styles */
/* Standalone version with v2 class naming */

.color-picker-v2-container {
  position: absolute;
  overflow: hidden;
  background-color:rgb(241 241 241);
  border: 1px solid rgb(143 139 136 / 45%);
  border-radius: 12px;
  padding: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  z-index: 9999;
  color: #000;
  visibility: hidden;
  transform: translateY(10px);
}

.color-picker-v2-container.open {
  opacity: 1;
  pointer-events: auto !important;
  transform: translateY(0);
  visibility: visible;
   
}

/* Closing animation state keeps it on-screen to allow fade/slide, then CSS returns it off-screen */
.color-picker-v2-container.closing {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.color-picker-v2-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 250px;
}

.color-picker-v2-gradient {
  height: 150px;
  border-radius: 8px;
  cursor: crosshair;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.color-selector-v2-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: border-color 0.2s ease-in-out;
  z-index: 2;
}

.color-picker-v2-slider {
  padding: 5px 0;
}

.hue-slider-v2 {
  width: 100%;
  height: 10px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right,
      #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
  border-radius: 5px;
  outline: none;
}

.hue-slider-v2::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(0, 0, 0, 1);
   
}

.hue-slider-v2::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(0, 0, 0, 0.2);
   
}

.color-presets-v2 {
  width: 100%;
  position: relative;
}

 

.color-preset-v2s-inner {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
   gap: 4px;
}


.color-preset-v2 {
  width: 100%;
  aspect-ratio: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
 
}

.color-preset-v2-swatch {
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
 border-radius: 6px;
   
}
 
.color-preset-v2 {
   border-radius: 6px;
   position: relative;
   overflow: hidden;
}

.color-preset-v2.active  {
  border: 2px solid rgb(250 132 24);
 
   
}

.color-preset-v2.active .color-preset-v2-swatch {
   box-shadow: none;
   border-radius: 0px;
}

/* Color dropper preset styles */
.color-dropper-preset-v2 {
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.color-dropper-preset-v2 svg {
  width: 12px;
  height: 12px;
  opacity: 1;
}

.color-dropper-preset-v2:hover {
  background-color: #e0e0e0;
}

.color-dropper-preset-v2:active {
  background-color: #d0d0d0;
}

/* Mobile optimizations */
@media (max-width: 767px) {
  .color-picker-v2-container {
    padding: 12px;
  }

  .color-presets-v2 {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    overflow: hidden;
    width: calc(100% + 24px);
    margin-right: -12px;
    margin-left: -12px;
    position: relative;
    height: auto;
  }

  /* Add the shadow element styles */
  .color-presets-v2-shadow,
  .color-preset-v2s-shadow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    pointer-events: none;
    z-index: 2;
     
  }

  .color-presets-v2-shadow-right,
  .color-preset-v2s-shadow-right {
    right: 0;
    background: linear-gradient(to right, rgba(224, 224, 224, 0), rgba(224, 224, 224, 0.85));
  }

  .color-presets-v2-shadow-left,
  .color-preset-v2s-shadow-left {
    left: 0;
    background: linear-gradient(to left, rgba(224, 224, 224, 0), rgba(224, 224, 224, 0.85));
  }

  .color-presets-v2-inner::-webkit-scrollbar,
  .color-preset-v2s-inner::-webkit-scrollbar {
    display: none;
  }

  .color-presets-v2-inner,
  .color-preset-v2s-inner {
    -ms-overflow-style: none;
    /* Internet Explorer 10+ */
    scrollbar-width: none;
    /* Firefox */
    overflow-x: scroll;
    overflow-y: hidden;
    width: 100%;
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    grid-auto-flow: column;
    gap: 4px;
    height: auto;
    padding: 4px 0;
  }

  .color-preset-v2 {
    min-width: 30px;
    width: 30px;
    height: 30px;
  }

  .color-preset-v2:last-child {
    margin-right: 15px;
  }

  .color-preset-v2:first-child,
  .color-preset-v2:nth-child(2),
  .color-preset-v2:nth-child(3) {
    margin-left: 15px;
  }

  .color-picker-v2-gradient {
   height: 110px;
  }


.color-picker-v2-panel {
 
   gap: 6px;
   width: 230px;
 }
}

