@tailwind base;
@tailwind components;
@tailwind utilities;

/* Utility to clamp lines for descriptions */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.ql-picker-item[data-value="#ffffff00"] {
  background-color: transparent !important; 
  width: 20px;
  height: 20px;
  position: relative; 
  background-image: none;
}

/* emoji */
.ql-picker-item[data-value="#ffffff00"]::before {
  content: "❌"; 
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;  
  line-height: 1;
}


@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* quill custom */
.ql-color .ql-picker-options [data-value=custom-color],
.ql-background .ql-picker-options [data-value=custom-color] {
  background: none !important;
  width: 100% !important;
  height: 24px !important;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  padding: 4px 0;
}

.ql-color .ql-picker-options [data-value=custom-color]:before {
  content: '🎨 Custom Color';
}

.ql-background .ql-picker-options [data-value=custom-color]:before {
  content: '🎨 Custom Color';
}

.ql-color .ql-picker-options [data-value=custom-color]:hover,
.ql-background .ql-picker-options [data-value=custom-color]:hover {
  border-color: #e5e7eb !important;
  background-color: #f3f4f6 !important;
}
.pagy {
  display: flex;
  font-family: sans-serif;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: rgb(107 114 128);
  & > :not([hidden]) ~ :not([hidden]) {
    --space-reverse: 0;
    margin-right: calc(0.25rem * var(--space-reverse));
    margin-left: calc(0.25rem * calc(1 - var(--space-reverse)));
  }

  a:not(.gap) {
    display: block;
    text-decoration: none;
    border-radius: 0.5rem;
    background-color: rgb(229 231 235);
    padding: 0.25rem 0.75rem;
    color: inherit;
    &:hover {
      background-color: rgb(209 213 219);
    }
    &:not([href]) { /* disabled links */
      cursor: default;
      background-color: rgb(243 244 246);
      color: rgb(209 213 219);
    }
    &.current {
      background-color: rgb(156 163 175);
      color: rgb(255 255 255);
    }
  }

  label {
    white-space: nowrap;
    display: inline-block;
    border-radius: 0.5rem;
    background-color: rgb(229 231 235);
    padding: 0.125rem 0.75rem;
    input {
      line-height: 1.5rem;
      border-radius: 0.375rem;
      border-style: none;
      background-color: rgb(243 244 246);
    }
  }
}

.path-group {
  position: relative;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.path-group:hover {
  background-color: rgba(249, 115, 22, 0.05);
}

/* Draggable item styles */
[data-path-tree-target="step"] {
  cursor: grab;
  transition: opacity 0.2s, transform 0.1s;
}

[data-path-tree-target="step"]:active {
  cursor: grabbing;
}

[data-path-tree-target="step"].dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

/* Drop zone feedback */
[data-path-tree-target="pathHeader"].drag-over {
  background-color: rgba(249, 115, 22, 0.2);
}

[data-path-tree-target="pathContent"].drag-over {
  background-color: rgba(249, 115, 22, 0.1);
}

/* Path indicators */
.path-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 4px;
}

/* Path icons */
.path-icon {
  flex-shrink: 0;
  margin-right: 4px;
}

/* Animate chevron rotation */
.path-chevron {
  transition: transform 0.2s ease;
}

/* Step title styles */
.step-title {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}