/*
 * Generic Kanban board layout shared by every module. Only board/column/
 * card structure and drag states live here — what appears inside a card
 * is entirely up to the module rendering it (see e.g. crm.css for the
 * CRM's opportunity card content styles).
 */

.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.kanban-column {
    flex: 0 0 280px;
    width: 280px;
    display: flex;
    flex-direction: column;
    max-height: 75vh;
    background: #f5f6f8;
    border-radius: 6px;
    overflow: hidden;
}

.kanban-column__header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #eaecef;
    font-weight: 600;
}

.kanban-column__count {
    font-size: 0.8em;
    font-weight: 600;
    color: #666;
    background: #fff;
    border-radius: 10px;
    padding: 0.1em 0.6em;
}

.kanban-column__body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: background-color 0.15s ease;
}

.kanban-dropzone--over {
    background-color: #e8f0fb;
}

.kanban-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    cursor: grab;
    transition: box-shadow 0.15s ease, opacity 0.15s ease;
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card--dragging {
    opacity: 0.4;
}

.kanban-card--saving {
    opacity: 0.7;
    pointer-events: none;
}

@media (max-width: 600px) {
    .kanban-column {
        flex-basis: 240px;
        width: 240px;
    }
}
