/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

html,
body {
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

section[data-controller~="kanban-board"][data-content-font-family="source_han_serif"] {
  --kanban-content-font-family: "Source Han Serif SC", "Source Han Serif CN", "Noto Serif CJK SC", "思源宋体", "Source Han Serif", "Songti SC", "STSong", "SimSun", "NSimSun", serif;
}

section[data-controller~="kanban-board"][data-content-font-family="system_default"] {
  --kanban-content-font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

section[data-controller~="kanban-board"][data-content-font-family] :where(
  .kanban-task-card__content-preview,
  lexxy-editor.kanban-lexxy-editor--card .lexxy-editor__content,
  lexxy-editor.kanban-lexxy-editor--detail .lexxy-editor__content,
  [data-role="ai-task-content-input"],
  [data-ai-task-content-preview],
  [data-task-overview-text],
  [data-timeline-text-content],
  .kanban-timeline-rich-content
) {
  font-family: var(--kanban-content-font-family);
}

section[data-controller~="kanban-board"][data-content-font-family="source_han_serif"] :where(.kanban-content-serif-compact) {
  font-size: 0.96em;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.58;
}

section[data-controller~="kanban-board"][data-content-font-family="source_han_serif"] :where(.kanban-content-serif-compact p, .kanban-content-serif-compact li) {
  margin-block: 0.3em;
}

section[data-controller~="kanban-board"] :where([data-settings-file-picker-name]) {
  max-width: 16rem;
}

.kanban-complete-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  will-change: transform, opacity, filter;
}

.kanban-complete-sweep {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0.86;
  background: linear-gradient(90deg, rgba(224, 142, 92, 0.08), rgba(222, 136, 84, 0.28) 45%, rgba(214, 112, 64, 0.5) 72%, rgba(196, 88, 52, 0.66));
  mix-blend-mode: screen;
}

.kanban-complete-sweep::before {
  content: "";
  position: absolute;
  top: -14%;
  right: -6%;
  width: 44%;
  height: 128%;
  background: radial-gradient(ellipse at 30% 50%, rgba(239, 201, 148, 0.76), rgba(216, 149, 90, 0.52) 52%, rgba(190, 103, 63, 0.08) 100%);
  filter: blur(7px);
  opacity: 0.78;
  animation: kanban-burn-flicker 220ms ease-in-out infinite alternate;
}

.kanban-complete-sweep::after {
  content: "";
  position: absolute;
  top: -8%;
  right: -3%;
  width: 30%;
  height: 116%;
  background: linear-gradient(90deg, rgba(243, 222, 188, 0), rgba(240, 220, 187, 0.72) 72%, rgba(248, 235, 214, 0.62));
  filter: blur(3px);
  opacity: 0.72;
}

.kanban-complete-card.is-completing .kanban-complete-sweep {
  transition: transform 250ms cubic-bezier(0.2, 0.84, 0.22, 1), opacity 160ms linear;
  transform: scaleX(1);
}

.kanban-complete-card.is-completing {
  box-shadow: inset -20px 0 34px rgba(255, 111, 48, 0.3), 0 10px 22px -18px rgba(173, 62, 24, 0.36);
  filter: saturate(1.12) contrast(1.04) brightness(0.96);
}

.kanban-complete-card.is-exiting {
  transition: transform 250ms cubic-bezier(0.2, 0.72, 0.2, 1), opacity 250ms ease, filter 250ms ease;
  transform: translateX(32px) scale(0.966) rotate(0.2deg);
  opacity: 0;
  filter: blur(1.25px) saturate(1.24) brightness(1.02);
}

@keyframes kanban-burn-flicker {
  0% {
    opacity: 0.72;
    transform: translateY(1px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(-1px) scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .kanban-complete-card,
  .kanban-complete-card.is-completing,
  .kanban-complete-card.is-exiting,
  .kanban-complete-card.is-completing .kanban-complete-sweep {
    transition: none;
    animation: none;
    transform: none;
    filter: none;
    opacity: 1;
  }
}

/* Cursor fallback for Kanban interactions / 看板交互鼠标形态兜底 */
[data-draggable-card],
[data-create-form-surface] {
  cursor: grab;
}

[data-draggable-card]:active,
[data-create-form-surface]:active,
[data-draggable-card].cursor-grabbing,
[data-create-form-surface].cursor-grabbing {
  cursor: grabbing;
}

section[data-controller~="kanban-board"] button:not(:disabled),
section[data-controller~="kanban-board"] [data-select-menu-trigger],
section[data-controller~="kanban-board"] [data-quick-menu-trigger],
section[data-controller~="kanban-board"] [data-create-meta-trigger],
section[data-controller~="kanban-board"] [data-select-menu-label],
section[data-controller~="kanban-board"] [data-action*="#toggleColumnCollapse"],
section[data-controller~="kanban-board"] [data-action*="#summon"],
section[data-controller~="kanban-board"] summary,
section[data-controller~="kanban-board"] input[type="checkbox"],
section[data-controller~="kanban-board"] label[data-no-open-edit],
[data-quick-menu-root] button:not(:disabled),
[data-quick-menu-option] {
  cursor: pointer;
}

section[data-controller~="kanban-board"] textarea,
section[data-controller~="kanban-board"] [contenteditable=""],
section[data-controller~="kanban-board"] [contenteditable="true"],
section[data-controller~="kanban-board"] [data-inline-edit-task-id],
[data-quick-menu-input] {
  cursor: text;
}

section[data-controller~="kanban-board"] [data-column-resize-handle] {
  cursor: col-resize;
}

section[data-controller~="kanban-board"] button:disabled,
section[data-controller~="kanban-board"] [aria-disabled="true"],
[data-quick-menu-root] button:disabled,
[data-quick-menu-root] [aria-disabled="true"] {
  cursor: not-allowed;
}

body.cursor-grabbing,
body.cursor-grabbing * {
  cursor: grabbing !important;
}

body.cursor-col-resize,
body.cursor-col-resize * {
  cursor: col-resize !important;
}

body.cursor-crosshair,
body.cursor-crosshair * {
  cursor: crosshair !important;
}

/* 项目属性设置：每个选项使用可拖拽卡片表达，并保持单行布局。 */
section[data-controller~="kanban-board"] [data-task-option-line-shell] {
  width: 100%;
}

section[data-controller~="kanban-board"] [data-task-option-line] {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
  width: 100%;
}

section[data-controller~="kanban-board"] [data-task-option-item] {
  position: relative;
}

section[data-controller~="kanban-board"] [data-task-option-card] {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 8px 18px -14px rgba(15, 23, 42, 0.22);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background-color 160ms ease,
    opacity 160ms ease;
}

section[data-controller~="kanban-board"] [data-task-option-card]:hover {
  border-color: #b8cff6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 0 0 1px rgba(184, 207, 246, 0.16),
    0 12px 24px -16px rgba(15, 23, 42, 0.24);
}

section[data-controller~="kanban-board"] [data-task-option-item][data-task-option-drag-state="dragging"] [data-task-option-card] {
  opacity: 0.58;
  transform: scale(0.985);
  border-color: #b8cff6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 0 0 1px rgba(184, 207, 246, 0.16),
    0 16px 32px -20px rgba(15, 23, 42, 0.3);
}

section[data-controller~="kanban-board"] [data-task-option-item][data-task-option-drop-position="before"]::before,
section[data-controller~="kanban-board"] [data-task-option-item][data-task-option-drop-position="after"]::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  height: 3px;
  border-radius: 999px;
  background: #0a84ff;
  box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.14);
}

section[data-controller~="kanban-board"] [data-task-option-item][data-task-option-drop-position="before"]::before {
  top: -0.5rem;
}

section[data-controller~="kanban-board"] [data-task-option-item][data-task-option-drop-position="after"]::after {
  bottom: -0.5rem;
}

section[data-controller~="kanban-board"] [data-task-option-role="name"] {
  flex: 1 1 14rem;
  min-width: 14rem;
}

section[data-controller~="kanban-board"] [data-task-option-controls] {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-left: auto;
  flex: 0 0 auto;
}

section[data-controller~="kanban-board"] [data-task-option-color-picker],
section[data-controller~="kanban-board"] [data-task-option-completed-button],
section[data-controller~="kanban-board"] [data-task-option-delete-button] {
  flex: 0 0 auto;
}

section[data-controller~="kanban-board"] [data-task-option-color-picker] > summary {
  display: flex;
}

section[data-controller~="kanban-board"] [data-task-option-color-trigger]:hover {
  border-color: #b8cff6 !important;
  background: rgba(248, 250, 252, 0.96) !important;
  color: #355075 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px -16px rgba(15, 23, 42, 0.22);
}

section[data-controller~="kanban-board"] [data-task-option-completed-button]:hover {
  background: rgba(148, 163, 184, 0.12) !important;
  color: #475569 !important;
}

section[data-controller~="kanban-board"] [data-task-option-palette] {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.5rem;
}

section[data-controller~="kanban-board"] [data-task-option-preset] {
  width: 2rem;
  height: 2rem;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease,
    opacity 140ms ease;
}

section[data-controller~="kanban-board"] [data-task-option-preset]:hover {
  transform: translateY(-1px);
}
