﻿/* Tabla fluida */
.table-config {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    table-layout: auto;
}

    /* Columnas fijas */
    .table-config col.fixed-col {
        width: 80px;
    }

    .table-config col.col-action {
        width: 80px;
    }

    /* Columnas autoexpandibles con ancho mínimo */
    .table-config col.autoexpand-col {
        min-width: 120px;
    }

    /* Columnas seleccionables con ancho fijo */
    .table-config col.select-col {
        width: 180px;
        min-width: 120px;
    }
    .table-config td.select-col {
        min-width: 120px;
    }

    /* Celdas generales */
    .table-config th,
    .table-config td {
        padding: 0.2rem 0.3rem;
        border: 1px solid #ced4da;
        vertical-align: middle;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Inputs y selects compactos */
    .table-config input,
    .table-config select {
        font-size: 0.75rem;
        padding: 0.1rem 0.25rem;
        height: auto;
        line-height: 1.2;
        border-radius: 0.2rem;
        border: 1px solid #ccc;
        background-color: #fff;
        width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }

    /* Checkbox */
    .table-config .form-check-input {
        margin: 0;
        padding: 0;
        width: 1rem;
        height: 1rem;
        vertical-align: middle;
        cursor: pointer;
        display: inline-block;
    }

/* Celdas numéricas */
.numeric-col {
    text-align: center;
}

.table-config .numeric-col input {
    text-align: right;
}

/* Celda de acciones */
.table-config td.action-cell {
    border: none !important;
    background-color: transparent !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.3rem;
    padding: 0.2rem 0.3rem;
    overflow: visible;
    position: relative;
}

/* Botones icono sin bordes */
.btn-icon {
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Iconos */
.table-config td.action-cell i.bi-check-lg {
    color: #198754;
}

    .table-config td.action-cell i.bi-check-lg:hover {
        color: #157347;
    }

.table-config td.action-cell i.bi-trash-fill {
    color: #dc3545;
}

    .table-config td.action-cell i.bi-trash-fill:hover {
        color: #bb2d3b;
    }

/* Paginación */
.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-header-cell {
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 2px 0;
}

.calendar-cell {
    padding: 6px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

    .calendar-cell.empty {
        background: transparent;
        cursor: default;
    }

.day-laborable {
    background: #e8f5e9;
}

.day-capsetmana {
    background: #eeeeee;
}

.day-festiu {
    background: #ffcccc;
}

.day-nolaborable {
    background: #ffe0b2;
}

.calendar-cell:hover {
    outline: 2px solid #007bff;
}

.legend-box {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 0.85rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
    border: 1px solid #ccc;
}

.legend-number {
    font-weight: 600;
}

.legend-text {
    opacity: 0.85;
}

/* Colors coherents amb el calendari */
.legend-color.festiu {
    background: #ffcccc;
}

.legend-color.nolaborable {
    background: #ffe0b2;
}

.legend-color.laborable {
    background: #e8f5e9;
}

.legend-color.capsetmana {
    background: #eeeeee;
}
