/* Butcherslist - Custom Styles */

/* ---- Layout ---- */
.sidebar-body {
    width: 260px;
    min-height: calc(100vh - 56px);
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    padding: 1rem 0;
    overflow-y: auto;
}

@media (max-width: 991.98px) {
    .sidebar-body {
        width: 100%;
        min-height: auto;
        border-right: none;
    }
}

.main-content {
    min-height: calc(100vh - 56px);
    overflow-y: auto;
}

@media (min-width: 992px) {
    .main-content {
        margin-left: 260px;
    }
}

/* ---- Sidebar Links ---- */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.15s;
}

.sidebar-link:hover {
    background-color: #e9ecef;
    color: #333;
}

.sidebar-link.active {
    background-color: #0d6efd;
    color: #fff;
}

.sidebar-link.active .badge {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

/* ---- List Color Dot ---- */
.list-color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Task List ---- */
.task-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.15s;
}

.task-item:hover {
    background-color: #f8f9fa;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #adb5bd;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
}

.task-title {
    flex-grow: 1;
    margin: 0 0.75rem;
}

.task-star {
    cursor: pointer;
    color: #adb5bd;
    background: none;
    border: none;
    padding: 0;
    font-size: 1.1rem;
}

.task-star.starred {
    color: #ffc107;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.task-due.overdue {
    color: #dc3545;
    font-weight: 600;
}

/* ---- Priority Colors ---- */
.priority-low { color: #198754; }
.priority-medium { color: #0d6efd; }
.priority-high { color: #fd7e14; }
.priority-urgent { color: #dc3545; }

.priority-badge-low { background-color: #198754; }
.priority-badge-medium { background-color: #0d6efd; }
.priority-badge-high { background-color: #fd7e14; }
.priority-badge-urgent { background-color: #dc3545; }

/* ---- Inline Task Input ---- */
.task-add-input {
    border: none;
    border-bottom: 2px solid #0d6efd;
    border-radius: 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.task-add-input:focus {
    box-shadow: none;
    border-bottom-color: #0a58ca;
}

/* ---- Task Detail Panel ---- */
.task-detail-panel {
    position: fixed;
    top: 56px;
    right: 0;
    width: 400px;
    max-width: 100%;
    height: calc(100vh - 56px);
    background: #fff;
    border-left: 1px solid #dee2e6;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 1040;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.task-detail-panel.open {
    transform: translateX(0);
}

/* ---- Drag & Drop ---- */
.sortable-ghost,
.drag-ghost {
    opacity: 0.4;
    background-color: #e3f2fd;
}

.drag-chosen {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.drag-handle {
    cursor: grab;
    color: #adb5bd;
    padding: 0 0.25rem;
}

.drag-handle:active {
    cursor: grabbing;
}

/* ---- Search Results ---- */
.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none !important;
}

/* ---- Task Overdue ---- */
.task-item.overdue {
    border-left: 3px solid #dc3545;
}

/* ---- Badge priorities ---- */
.badge.priority-low { background-color: #198754; color: #fff; }
.badge.priority-high { background-color: #fd7e14; color: #fff; }
.badge.priority-urgent { background-color: #dc3545; color: #fff; }

/* ---- Subtasks ---- */
.subtask-item {
    display: flex;
    align-items: center;
    padding: 0.35rem 0;
}

.subtask-item.completed .subtask-title {
    text-decoration: line-through;
    color: #adb5bd;
}

/* ---- Misc ---- */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
