/* Estilos frontend para el shortcode [conta_tareas_trabajador] */

.ct-frontend-wrapper {
    max-width: 1100px;
    margin: 0 auto 20px;
    font-size: 14px;
}

.ct-frontend-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.ct-frontend-section {
    margin-top: 20px;
}

.ct-frontend-section-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.ct-frontend-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.ct-frontend-table th,
.ct-frontend-table td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    text-align: left;
    vertical-align: middle;
}

.ct-frontend-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.ct-estado-pendiente {
    color: #b30000;
    font-weight: 600;
}

.ct-estado-completada {
    color: #008000;
    font-weight: 600;
}

.ct-text-muted {
    font-size: 12px;
    color: #777;
}

.ct-btn {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 13px;
}

.ct-btn:hover {
    background: #005f8d;
}

.ct-actions-form {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.ct-frontend-table select {
    max-width: 160px;
    font-size: 13px;
}




/* =========================================================
   ===============      MODO MÓVIL       ====================
   ========================================================= */

@media (max-width: 768px) {

    /* Toda la tabla se vuelve bloques */
    .ct-frontend-table,
    .ct-frontend-table thead,
    .ct-frontend-table tbody,
    .ct-frontend-table th,
    .ct-frontend-table td,
    .ct-frontend-table tr {
        display: block;
        width: 100%;
    }

    /* Ocultamos encabezado */
    .ct-frontend-table thead {
        display: none;
    }

    /* Cada fila será un bloque con margen */
    .ct-frontend-table tr {
        margin-bottom: 14px;
        border: 1px solid #ddd;
        padding: 8px;
        background: #fff;
        border-radius: 6px;
    }

    /* Cada celda aparece en una fila */
    .ct-frontend-table td {
        border: none;
        padding: 6px 0;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 6px;
    }

    /* Etiqueta del campo */
    .ct-frontend-table td::before {
        content: attr(data-label);
        font-weight: 600;
        min-width: 120px;
        color: #333;
    }

    /* Select más ancho */
    .ct-frontend-table select {
        width: 100%;
        max-width: 100%;
    }

    /* Botón dentro de una fila */
    .ct-actions-form {
        width: 100%;
        display: block;
    }

    .ct-actions-form button {
        width: 100%;
        margin-top: 6px;
    }
}
