/* Color Picker Styling - Match Papra Design System */

/* Papra color tokens for color picker */
.bg-bg-white-0 {
  background-color: hsl(var(--background));
}

.text-text-sub-600 {
  color: hsl(var(--muted-foreground));
}

.text-text-soft-400 {
  color: hsl(var(--muted-foreground));
}

.text-text-strong-950 {
  color: hsl(var(--foreground));
}

.text-primary-base {
  color: hsl(var(--primary));
}

.text-primary-darker {
  color: hsl(var(--primary) / 0.8);
}

.border-stroke-soft-200 {
  border-color: hsl(var(--border));
}

.border-stroke-white-0 {
  border-color: white;
}

.ring-stroke-white-0 {
  --tw-ring-color: white;
}

.ring-stroke-strong-950 {
  --tw-ring-color: hsl(var(--foreground));
}

.shadow-custom-md {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.shadow-regular-xs {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.shadow-button-important-focus {
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.3);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Text size utilities */
.text-label-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.text-paragraph-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 400;
}

/* Layout utilities */
.rounded-20 {
  border-radius: 1.25rem;
}

.rounded-l-10 {
  border-radius: 0.625rem 0 0 0.625rem;
}

.rounded-r-10 {
  border-radius: 0 0.625rem 0.625rem 0;
}

.rounded-full {
  border-radius: 9999px;
}

/* Hue Slider Styling */
.hue-slider {
  position: relative;
  touch-action: none;
  forced-color-adjust: none;
  background: linear-gradient(
    to right, 
    hsla(0, 100%, 50%, 1), 
    hsla(60, 100%, 50%, 1), 
    hsla(120, 100%, 50%, 1), 
    hsla(180, 100%, 50%, 1), 
    hsla(240, 100%, 50%, 1), 
    hsla(300, 100%, 50%, 1), 
    hsla(360, 100%, 50%, 1)
  ),
  repeating-conic-gradient(
    #fff 0 90deg,
    rgba(0,0,0,.3) 0 180deg
  ) 0% -25%/6px 6px;
  cursor: pointer;
}

.hue-slider-thumb {
  position: absolute;
  touch-action: none;
  forced-color-adjust: none;
  z-index: 50;
  cursor: grab;
  transition: transform 0.15s ease-out;
}

.hue-slider-thumb:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.1);
}

.hue-slider-input {
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 100%;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 100%;
  white-space: nowrap;
  opacity: 0.0001;
  pointer-events: none;
}

/* Input Group Styling */
.group\/input-wrapper {
  position: relative;
}

.group\/input-wrapper:hover .placeholder\:text-text-sub-600 {
  color: hsl(var(--muted-foreground));
}

.group\/input-wrapper:has(input:focus) .placeholder\:text-text-sub-600 {
  color: hsl(var(--muted-foreground));
}

/* Button styling */
.group:hover .hover\:text-text-strong-950 {
  color: hsl(var(--foreground));
}

.group:hover .hover\:bg-bg-weak-50 {
  background-color: hsl(var(--muted));
}

.group:hover .hover\:shadow-none {
  box-shadow: none;
}

.group:hover .hover\:ring-transparent {
  --tw-ring-color: transparent;
}

.focus-visible\:text-text-strong-950:focus-visible {
  color: hsl(var(--foreground));
}

.focus-visible\:shadow-button-important-focus:focus-visible {
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.3);
}

.focus-visible\:ring-stroke-strong-950:focus-visible {
  --tw-ring-color: hsl(var(--foreground));
}

/* Focus states */
.focus-within\:z-10:focus-within {
  z-index: 10;
}

.focus-within\:before\:ring-stroke-soft-200:focus-within:before {
  --tw-ring-color: hsl(var(--border));
}

.has-\[input\:focus\]\:shadow-button-important-focus:has(input:focus) {
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.3);
}

.has-\[input\:focus\]\:before\:ring-stroke-strong-950:has(input:focus):before {
  --tw-ring-color: hsl(var(--foreground));
}

/* Hover states */
.hover\:\[&\:not\(\:has\(input\:focus\)\)\:has\(\>\\:only-child\)\]\:before\:ring-transparent:hover:not(:has(input:focus)):has(> :only-child):before {
  --tw-ring-color: transparent;
}

.hover\:\[&\:not\(\:focus-within\)\]\:before\:\!ring-stroke-soft-200:hover:not(:focus-within):before {
  --tw-ring-color: hsl(var(--border)) !important;
}

/* Underline styling */
.underline {
  text-decoration-line: underline;
}

.decoration-transparent {
  text-decoration-color: transparent;
}

.underline-offset-\[3px\] {
  text-underline-offset: 3px;
}

.hover\:decoration-current:hover {
  text-decoration-color: currentColor;
}

.focus-visible\:underline:focus-visible {
  text-decoration-line: underline;
}

/* Dark mode specific styling */
[data-kb-theme="dark"] .bg-bg-white-0 {
  background-color: hsl(var(--card));
}

[data-kb-theme="dark"] .text-text-sub-600 {
  color: hsl(var(--muted-foreground));
}

[data-kb-theme="dark"] .text-text-soft-400 {
  color: hsl(var(--muted-foreground));
}

[data-kb-theme="dark"] .text-text-strong-950 {
  color: hsl(var(--foreground));
}

[data-kb-theme="dark"] .border-stroke-soft-200 {
  border-color: #262626;
}

[data-kb-theme="dark"] .shadow-custom-md {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
}

[data-kb-theme="dark"] .shadow-regular-xs {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.2);
}

[data-kb-theme="dark"] .shadow-md {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
}

/* Input field dark mode */
[data-kb-theme="dark"] .group\/input-wrapper:hover .hover\:\[&\:not\(\&\:has\(input\:focus\)\)\]\:bg-bg-weak-50:hover:not(&:has(input:focus)) {
  background-color: hsl(var(--muted));
}

/* Button dark mode */
[data-kb-theme="dark"] .group:hover .hover\:bg-bg-weak-50 {
  background-color: hsl(var(--muted));
}

/* Color swatch selection ring */
.border-\[\#335CFF1F\] {
  border-color: rgba(51, 92, 255, 0.12);
}

/* Size utilities */
.size-3 {
  width: 0.75rem;
  height: 0.75rem;
}

.size-5 {
  width: 1.25rem;
  height: 1.25rem;
}

.max-w-\[316px\] {
  max-width: 316px;
}

/* Spacing utilities */
.gap-2\.5 {
  gap: 0.625rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.space-y-3 > :not([hidden]) ~ :not([hidden]) {
  --un-space-y-reverse: 0;
  margin-top: calc(0.75rem * calc(1 - var(--un-space-y-reverse)));
}

.-space-x-px > :not([hidden]) ~ :not([hidden]) {
  --un-space-x-reverse: 0;
  margin-right: calc(-1px * calc(1 - var(--un-space-x-reverse)));
}

/* Padding utilities */
.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.pb-2\.5 {
  padding-bottom: 0.625rem;
}

.pb-5 {
  padding-bottom: 1.25rem;
}

.pt-4 {
  padding-top: 1rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.p-0 {
  padding: 0;
}

.px-2\.5 {
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-3\.5 {
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

/* Position utilities */
.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.inset-0 {
  inset: 0px;
}

.inset-x-1\.5 {
  left: 0.375rem;
  right: 0.375rem;
}

.top-1\/2 {
  top: 50%;
}

.-inset-\[5px\] {
  inset: -5px;
}

/* Z-index utilities */
.z-50 {
  z-index: 50;
}

.z-10 {
  z-index: 10;
}

/* Display utilities */
.flex {
  display: flex;
}

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

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.h-3 {
  height: 0.75rem;
}

.h-2 {
  height: 0.5rem;
}

.w-2 {
  width: 0.5rem;
}

.h-5 {
  height: 1.25rem;
}

.h-6 {
  height: 1.5rem;
}

.w-6 {
  width: 1.5rem;
}

.h-9 {
  height: 2.25rem;
}

.w-9 {
  width: 2.25rem;
}

.max-w-\[57px\] {
  max-width: 57px;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-\[2\] {
  flex: 2 2 0%;
}

/* Overflow utilities */
.overflow-hidden {
  overflow: hidden;
}

/* Cursor utilities */
.cursor-text {
  cursor: text;
}

.cursor-pointer {
  cursor: pointer;
}

/* Transition utilities */
.transition {
  transition: all 0.15s ease-in-out;
}

.duration-200 {
  transition-duration: 200ms;
}

.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

/* Outline utilities */
.outline-none {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* Whitespace utilities */
.whitespace-nowrap {
  white-space: nowrap;
}

/* Text alignment */
.text-center {
  text-align: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

/* Flex direction */
.flex-col {
  flex-direction: column;
}

/* Ring utilities */
.ring-1 {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.ring-0 {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.ring-inset {
  --tw-ring-inset: inset;
}

.ring-transparent {
  --tw-ring-color: transparent;
}

/* Border utilities */
.divide-x > :not([hidden]) ~ :not([hidden]) {
  --un-divide-x-reverse: 0;
  border-right-width: calc(1px * calc(1 - var(--un-divide-x-reverse)));
}

.border-b {
  border-bottom-width: 1px;
}

/* Background utilities */
.bg-transparent {
  background-color: transparent;
}

.bg-none {
  background-image: none;
}

/* Disabled states */
.disabled\:pointer-events-none:disabled {
  pointer-events: none;
}

.disabled\:bg-bg-weak-50:disabled {
  background-color: hsl(var(--muted));
}

.disabled\:text-text-disabled-300:disabled {
  color: hsl(var(--muted-foreground));
}

.disabled\:ring-transparent:disabled {
  --tw-ring-color: transparent;
}

.disabled\:shadow-none:disabled {
  box-shadow: 0 0 #0000;
}

.disabled\:no-underline:disabled {
  text-decoration-line: none;
}

/* Placeholder utilities */
.placeholder\:select-none::placeholder {
  user-select: none;
}

.placeholder\:text-text-soft-400::placeholder {
  color: hsl(var(--muted-foreground));
}

.placeholder\:transition::placeholder {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.placeholder\:duration-200::placeholder {
  transition-duration: 200ms;
}

.placeholder\:ease-out::placeholder {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

/* Group hover states */
.group:hover .group-hover\/input-wrapper\:placeholder\:text-text-sub-600::placeholder {
  color: hsl(var(--muted-foreground));
}

/* Group focus states */
.group:has(input:focus) .group-has-\[input\:focus\]\:placeholder\:text-text-sub-600::placeholder {
  color: hsl(var(--muted-foreground));
}

/* Before pseudo-element utilities */
.before\:absolute::before {
  content: var(--tw-content);
  position: absolute;
}

.before\:inset-0::before {
  content: var(--tw-content);
  inset: 0px;
}

.before\:ring-1::before {
  content: var(--tw-content);
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.before\:ring-inset::before {
  content: var(--tw-content);
  --tw-ring-inset: inset;
}

.before\:ring-stroke-soft-200::before {
  content: var(--tw-content);
  --tw-ring-color: hsl(var(--border));
}

.before\:pointer-events-none::before {
  content: var(--tw-content);
  pointer-events: none;
}

.before\:rounded-\[inherit\]::before {
  content: var(--tw-content);
  border-radius: inherit;
}

.before\:transition::before {
  content: var(--tw-content);
  transition: all 0.15s ease-in-out;
}

.before\:duration-200::before {
  content: var(--tw-content);
  transition-duration: 200ms;
}

.before\:ease-out::before {
  content: var(--tw-content);
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.before\:ring-transparent::before {
  content: var(--tw-content);
  --tw-ring-color: transparent;
}

.before\:ring-stroke-strong-950::before {
  content: var(--tw-content);
  --tw-ring-color: hsl(var(--foreground));
}
