/* ================================================
   BASES VIEWS - TaskNotes Integration Styles
   ================================================ */

/* Bases TaskNotes List View Container */
.tn-bases-tasknotes-list {
    display: flex;
    flex-direction: column;
    gap: var(--tn-spacing-xs);
    width: 100%;
    padding: var(--tn-spacing-sm);
}

/* Task Group Section (matches TaskListView structure) */
.tn-bases-tasknotes-list .task-section.task-group {
    margin-bottom: var(--tn-spacing-md);
}

/* Group Header */
.tn-bases-tasknotes-list .task-group-header {
    display: flex;
    align-items: center;
    gap: var(--tn-spacing-xs);
    justify-content: flex-start;
    padding: var(--tn-spacing-xs) var(--tn-spacing-md) var(--tn-spacing-xs) var(--tn-spacing-sm);
    margin-bottom: var(--tn-spacing-sm);
    border-bottom: 1px solid var(--tn-border-color);
    position: relative;
    font-size: var(--tn-font-size-lg);
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-text-normal);
    letter-spacing: 0.01em;
    line-height: 1.4;
    cursor: pointer;
}

/* Count element within group headers */
.tn-bases-tasknotes-list .task-group-header .agenda-view__item-count {
    margin-left: auto;
    margin-right: 0;
}

/* Toggle button for groups */
.tn-bases-tasknotes-list .task-group-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--tn-text-normal);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

/* Default expanded state - chevron pointing down */
.tn-bases-tasknotes-list .task-group .task-group-toggle svg {
    color: var(--tn-text-normal);
    transition: transform 0.2s ease;
    transform: rotate(90deg) !important;
}

/* Collapsed state - chevron pointing right */
.tn-bases-tasknotes-list .task-group.is-collapsed .task-group-toggle svg {
    transform: rotate(0deg) !important;
}

/* Hide task cards when collapsed */
.tn-bases-tasknotes-list .task-group.is-collapsed .task-cards {
    display: none;
}

/* Task cards container */
.tn-bases-tasknotes-list .tasks-container.task-cards {
    display: flex;
    flex-direction: column;
    gap: var(--tn-spacing-xs);
    padding-left: var(--tn-spacing-md);
}

/* Empty state */
.tn-bases-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--tn-spacing-xl);
    text-align: center;
    color: var(--tn-text-muted);
    background: var(--tn-bg-secondary);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-md);
    margin: var(--tn-spacing-lg) 0;
}

/* Kanban Board Styles */
.tn-bases-kanban-board {
    display: flex;
    gap: var(--tn-spacing-md);
    overflow-x: auto;
    padding: var(--tn-spacing-sm);
    min-height: 400px;
}

.tn-bases-kanban-column {
    flex: 0 0 280px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    background: var(--tn-bg-secondary);
    border: 1px solid var(--tn-border-color);
    border-radius: var(--tn-radius-md);
    overflow: hidden;
}

.tn-bases-kanban-column-header {
    padding: var(--tn-spacing-md);
    background: var(--tn-bg-primary);
    border-bottom: 1px solid var(--tn-border-color);
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-text-normal);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tn-bases-kanban-column-name {
    font-size: var(--tn-font-size-md);
}

.tn-bases-kanban-column-count {
    font-size: var(--tn-font-size-sm);
    color: var(--tn-text-muted);
    background: var(--tn-bg-secondary);
    padding: 2px 8px;
    border-radius: var(--tn-radius-sm);
}

.tn-bases-kanban-tasks {
    flex: 1;
    padding: var(--tn-spacing-sm);
    display: flex;
    flex-direction: column;
    gap: var(--tn-spacing-xs);
    overflow-y: auto;
}

/* Drag and drop styles */
.tn-bases-kanban-tasks.drag-over {
    background: var(--tn-interactive-hover);
    border: 2px dashed var(--tn-interactive-accent);
    border-radius: var(--tn-radius-sm);
}

/* Bases Calendar List View - minimalist styling */
.fc-event-default-list {
    padding: var(--tn-spacing-xs) var(--tn-spacing-sm);
    margin: var(--tn-spacing-xs) 0;
    background: transparent;
    border: none;
    border-radius: var(--tn-radius-sm);
}

/* Style FullCalendar list view structure */
#bases-calendar .fc-list {
    background: transparent;
}

#bases-calendar .fc-list-table {
    background: transparent;
}

#bases-calendar .fc-list-event {
    background: transparent;
    border: none;
}

#bases-calendar .fc-list-event:hover {
    background: var(--tn-interactive-hover);
}

#bases-calendar .fc-list-day-cushion {
    background: transparent;
    padding: var(--tn-spacing-sm) var(--tn-spacing-xs);
    border-bottom: 1px solid var(--tn-divider-color);
    font-weight: var(--tn-font-weight-medium);
}

#bases-calendar .fc-list-day {
    background: transparent;
}

/* Responsive design for Bases views */
@media (max-width: 768px) {
    .tn-bases-kanban-board {
        gap: var(--tn-spacing-sm);
    }

    .tn-bases-kanban-column {
        flex: 0 0 240px;
        min-width: 240px;
    }
}

@media (max-width: 480px) {
    .tn-bases-tasknotes-list .task-group-header {
        font-size: var(--tn-font-size-md);
        padding: var(--tn-spacing-sm) 0 var(--tn-spacing-xs);
    }

    .tn-bases-kanban-column {
        flex: 0 0 200px;
        min-width: 200px;
    }
}
