/* ═══════════════════════════════════════════════════════════
   DevBoard – Minimal Styles
   ═══════════════════════════════════════════════════════════ */

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.25);
  border-radius: 100px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(156, 163, 175, 0.45);
}
.dark ::-webkit-scrollbar-thumb {
  background: rgba(75, 85, 99, 0.3);
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(75, 85, 99, 0.5);
}

.card-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.2) transparent;
}

/* ─── Sortable ──────────────────────────────────────────── */
.card-list .ui-sortable-placeholder {
  background: rgba(99, 102, 241, 0.06);
  border: 1.5px dashed rgba(99, 102, 241, 0.25);
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  visibility: visible !important;
  height: 52px;
}

.kanban-card.ui-sortable-helper {
  transition: none !important;
  animation: none !important;
  transform: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0.92;
  z-index: 1000;
  will-change: left, top;
  pointer-events: none;
}
.dark .kanban-card.ui-sortable-helper {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.kanban-card.is-dragging {
  transition: none !important;
}

#board-columns .ui-sortable-placeholder {
  background: rgba(99, 102, 241, 0.04);
  border: 1.5px dashed rgba(99, 102, 241, 0.15);
  border-radius: 0.75rem;
  width: 280px;
  flex-shrink: 0;
  height: 100% !important;
  box-sizing: border-box;
  visibility: visible !important;
}

/* Prevent horizontal scroll inside columns */
.kanban-column { overflow: hidden; }
.card-list { overflow-x: hidden; }

/* ─── Transitions ───────────────────────────────────────── */
.kanban-card {
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

/* ─── Animations ────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

.kanban-card {
  animation: fadeInUp 0.2s ease-out;
}
[id^="modal-"]:not(.hidden) > div:last-child {
  animation: slideIn 0.15s ease-out;
}
[id$="-dropdown"] {
  animation: slideIn 0.12s ease-out;
}

/* ─── Toasts ────────────────────────────────────────────── */
.toast-item {
  animation: fadeInUp 0.25s ease-out;
}
.toast-item.toast-exit {
  animation: fadeOut 0.25s ease-in forwards;
}

/* ─── Utilities ─────────────────────────────────────────── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Rich Text Editor ──────────────────────────────────── */
.rich-desc:empty::before {
  content: attr(placeholder);
  color: #9ca3af;
  pointer-events: none;
}
.dark .rich-desc:empty::before {
  color: #6b7280;
}
.rich-desc ul,
.rich-desc ol {
  padding-left: 1.5em;
  margin: 0.25em 0;
}
.rich-desc ul {
  list-style-type: disc;
}
.rich-desc ol {
  list-style-type: decimal;
}
.rich-desc a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.9em;
  text-decoration: none;
  transition: background 0.15s;
}
.rich-desc a:hover {
  background: rgba(99, 102, 241, 0.16);
}
.rich-desc a::before {
  content: "🔗";
  font-size: 0.7em;
}
.rich-desc pre,
.rich-desc code {
  background: rgba(99, 102, 241, 0.08);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85em;
}
.rich-desc pre {
  padding: 8px 12px;
  margin: 0.25em 0;
  display: block;
  overflow-x: auto;
}

/* ─── Color Swatch Picker ───────────────────────────────── */
.color-swatch-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.6),
    0 0 0 3px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  transition: box-shadow 0.15s;
}
.color-swatch-wrap:hover {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.8),
    0 0 0 3px rgba(99, 102, 241, 0.4);
}
.dark .color-swatch-wrap {
  box-shadow:
    0 0 0 2px rgba(30, 30, 40, 0.8),
    0 0 0 3px rgba(255, 255, 255, 0.1);
}
.dark .color-swatch-wrap:hover {
  box-shadow:
    0 0 0 2px rgba(30, 30, 40, 0.8),
    0 0 0 3px rgba(99, 102, 241, 0.5);
}
.color-swatch-wrap.color-swatch-lg {
  width: 28px;
  height: 28px;
}
.color-swatch {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  background: none;
}
.color-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-swatch::-webkit-color-swatch {
  border: none;
  border-radius: 0;
}
.color-swatch::-moz-color-swatch {
  border: none;
  border-radius: 0;
}

/* ─── Date Input Icon Color ─────────────────────────────── */
.date-input {
  color-scheme: light;
}
.dark .date-input {
  color-scheme: dark;
}
.date-input::-webkit-calendar-picker-indicator {
  filter: invert(40%) sepia(90%) saturate(600%) hue-rotate(210deg);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.date-input::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}
