/* ===========================================
   Kanban Board Styles
   =========================================== */

/* Kanban Card */
.kanban-card {
    transition: transform 0.15s, box-shadow 0.15s;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* ===========================================
   Gantt Chart Styles
   =========================================== */

.gantt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.gantt-task-header {
    min-width: 220px;
    max-width: 220px;
    position: sticky;
    left: 0;
    background-color: var(--mud-palette-primary);
    color: white;
    padding: 6px 8px;
    text-align: left;
    z-index: 2;
    font-weight: 600;
}

.gantt-date-header {
    min-width: 28px;
    max-width: 28px;
    background-color: var(--mud-palette-primary);
    color: white;
    padding: 2px;
    text-align: center;
    font-size: 0.65rem;
}

.gantt-date-header.today {
    background-color: var(--mud-palette-info);
}

.gantt-date-header.weekend {
    background-color: var(--mud-palette-primary-darken);
}

.gantt-date-header .day-name {
    font-size: 0.55rem;
    opacity: 0.8;
}

.gantt-task-cell {
    position: sticky;
    left: 0;
    background-color: var(--mud-palette-surface);
    padding: 4px 6px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    z-index: 1;
}

.gantt-task-cell .task-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gantt-task-cell .task-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.gantt-task-cell .task-title {
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.gantt-task-cell .task-meta {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

.gantt-task-cell .mini-tag {
    font-size: 0.55rem;
    padding: 1px 4px;
    border-radius: 3px;
    color: white;
    white-space: nowrap;
}

.gantt-bar-cell {
    padding: 0;
    margin: 0;
    border: none;
    height: 28px;
    vertical-align: middle;
}

.gantt-bar-cell.today {
    background-color: rgba(33, 150, 243, 0.08);
}

.gantt-bar-cell.weekend {
    background-color: rgba(0, 0, 0, 0.03);
}

.gantt-bar {
    height: 18px;
    margin: 5px 0;
}

.gantt-bar.bar-start {
    border-radius: 3px 0 0 3px;
    margin-left: 1px;
}

.gantt-bar.bar-end {
    border-radius: 0 3px 3px 0;
    margin-right: 1px;
}

.gantt-bar.bar-start.bar-end {
    border-radius: 3px;
    margin: 5px 1px;
}

/* ===========================================
   Gantt — subtareas
   =========================================== */

.gantt-subtask-row td {
    background-color: rgba(0, 0, 0, 0.02);
}

.gantt-subtask-row .gantt-task-cell {
    background-color: rgba(0, 0, 0, 0.025);
}

.task-info-child {
    padding-left: 8px;
}

.task-title-child {
    font-weight: 400 !important;
    font-size: 0.7rem !important;
    color: var(--mud-palette-text-secondary);
}

.subtask-indent {
    margin-right: 3px;
    color: var(--mud-palette-text-disabled);
    font-size: 0.75rem;
}

.gantt-parent-row {
    border-top: 1px solid var(--mud-palette-lines-default);
}

/* Expand/collapse button in Gantt task name cell */
.gantt-expand-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-right: 2px;
}

.gantt-expand-btn:hover {
    opacity: 0.7;
}

/* Badge showing subtask count on parent row */
.gantt-subtask-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--mud-palette-primary);
    color: white;
    border-radius: 10px;
    font-size: 0.6rem;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    margin-left: 4px;
    vertical-align: middle;
    font-weight: 600;
}

/* Gantt bar label (task title clipped on bar) */
.gantt-bar-label {
    display: block;
    font-size: 0.6rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 3px;
    line-height: 18px;
    pointer-events: none;
}

/* Subtask bar — slightly thinner and lighter */
.gantt-bar.bar-subtask {
    height: 12px;
    margin: 8px 0;
    opacity: 0.75;
}

/* Gantt — nombre usuario visible */
.gantt-usuario-nombre {
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    color: var(--mud-palette-text-secondary);
}

/* ===========================================
   Kanban Board — bloque subtareas en tarjeta
   =========================================== */

.kanban-subtareas-block {
    margin-top: 4px;
    border-top: 1px solid var(--mud-palette-lines-default);
    padding-top: 3px;
}

.kanban-subtareas-header {
    padding: 2px 0;
    user-select: none;
}

.kanban-subtareas-header:hover {
    opacity: 0.8;
}

.kanban-subtareas-lista {
    margin-top: 4px;
    padding-left: 2px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.kanban-subtarea-fila {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.1s;
    font-size: 0.72rem;
}

.kanban-subtarea-fila:hover {
    background-color: var(--mud-palette-action-hover);
}

.kanban-subtarea-titulo {
    flex: 1;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-subtarea-done {
    text-decoration: line-through;
    opacity: 0.6;
}

/* ===========================================
   Tag Color Picker
   =========================================== */

.tag-color-picker {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-color-picker .mud-icon-root {
    color: white !important;
}

.color-picker-menu .mud-menu-activator > .mud-button-root {
    min-width: 40px !important;
    padding: 8px !important;
}
