/* Checkbox completion animation */
.item-completing {
    animation: completeItem 0.4s ease-out forwards;
}

@keyframes completeItem {
    0% { opacity: 1; transform: translateX(0); }
    50% { opacity: 0.5; transform: translateX(10px); }
    100% { opacity: 0.6; transform: translateX(0); }
}

/* Done item style */
.item-done .item-title {
    text-decoration: line-through;
    color: rgba(0, 0, 0, 0.4);
}

/* Sortable ghost */
.sortable-ghost {
    opacity: 0.4;
    background: #e8f0fe !important;
    border-radius: 0.5rem;
}

.sortable-drag {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

/* Sidebar collapsed state */
.sidebar-collapsed .sidebar-inner {
    width: 0;
    overflow: hidden;
    border: none;
}

.sidebar-collapsed {
    width: auto !important;
    border: none !important;
}

/* Custom checkbox */
.todo-checkbox {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.todo-checkbox:hover {
    border-color: #9ca3af;
}

.todo-checkbox:checked {
    background-color: #6b7280;
    border-color: #6b7280;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
    background-size: 100%;
    background-position: center;
    background-repeat: no-repeat;
}

/* Drag handle */
.drag-handle {
    cursor: grab;
    color: #d1d5db;
    transition: color 0.2s;
}

.drag-handle:hover {
    color: #9ca3af;
}

/* Item title as drag handle keeps text styling */
span.drag-handle {
    color: inherit;
    cursor: grab;
    user-select: none;
}

span.drag-handle:hover {
    color: inherit;
}

/* ColSpan dropdown */
.colspan-select {
    outline: none;
    appearance: auto;
}

/* Sidebar list item active */
.sidebar-item.active {
    background-color: #edf2f9;
    color: #6b7280;
}

/* Transition for sidebar on mobile */
#sidebar {
    will-change: transform;
}

/* Toast animation */
.toast-show {
    animation: toastIn 0.3s ease-out;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Multi-column item flow */
.todo-item {
    break-inside: avoid;
}

/* Important badge */
.important-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    background-color: #991b1b;
    border-radius: 50%;
    flex-shrink: 0;
}

.important-badge i {
    color: white;
    font-size: 0.6rem;
    line-height: 1;
}

/* Note card */
.note-card {
    display: flex;
    flex-direction: column;
}

.note-card > .p-4 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.note-card .note-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.note-card .ql-toolbar {
    border-color: #e5e7eb;
    border-radius: 0.5rem 0.5rem 0 0;
    flex-shrink: 0;
}

.note-card .ql-container {
    flex: 1;
    min-height: 200px;
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 0.875rem;
    border-color: #e5e7eb;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Focus styles */
input:focus, textarea:focus {
    outline: none;
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(125, 167, 217, 0.2);
}
